Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use jmeter ui on ultra high resolution display

The jmeter UI on windows 8 with a 3200X1800 Lenovo Laptop is unusable. Fonts on the far left pane are toooo small and on the right side the line spacing is too small for the fonts. If I change my resolution to 1920X1080, it has no effect. tried using on second monitor that is 1920X1080. No Luck. System is set for larges sizes. Can't seem to swap which monitor is primary either. Anyone solve this?

like image 246
user3911406 Avatar asked Aug 05 '14 17:08

user3911406


3 Answers

Edit as of August 2017 for version 3.2:

The answer below might be more up to date and simple

  • https://stackoverflow.com/a/45773659/460802

I stumbled upon answer about setting Swing font at runtime and it gave me a clue how to set JMeter's fonts.

According to Swing's DefaultMetalTheme.java source, this is a list of recognized Java properties which are used to determine the font size:

  128       private static final String[] defaultNames = {
  129           "swing.plaf.metal.controlFont",
  130           "swing.plaf.metal.systemFont",
  131           "swing.plaf.metal.userFont",
  132           "swing.plaf.metal.controlFont",
  133           "swing.plaf.metal.controlFont",
  134           "swing.plaf.metal.smallFont"
  135       };

So, what you need to do is to make sure these are set appropriately before JMeter starts. This is environment dependent, but I assume you use Windows and you are launching JMeter via the jmeter.bat file. Just add these lines somewehere near the top of the jmeter.bat file:

set JVM_ARGS=%JVM_ARGS% -Dswing.plaf.metal.controlFont=Dialog-20
set JVM_ARGS=%JVM_ARGS% -Dswing.plaf.metal.systemFont=Dialog-20
set JVM_ARGS=%JVM_ARGS% -Dswing.plaf.metal.userFont=SansSerif-18
set JVM_ARGS=%JVM_ARGS% -Dswing.plaf.metal.smallFont=SansSerif-16

Update: user lyaffe pointed out in comment that on a 4K laptop display you want to have fonts even bigger:

set JVM_ARGS=%JVM_ARGS% -Dswing.plaf.metal.controlFont=Dialog-32
set JVM_ARGS=%JVM_ARGS% -Dswing.plaf.metal.systemFont=Dialog-32
set JVM_ARGS=%JVM_ARGS% -Dswing.plaf.metal.userFont=SansSerif-20
set JVM_ARGS=%JVM_ARGS% -Dswing.plaf.metal.smallFont=SansSerif-20

Then start JMeter and make sure you use the Metal look and feel (Options -> Look and Feel -> Metal).

Unfortunately, this won't affect font used in the left pane. It is either explicitly set to some small value, I guess, or it is controlled via another Java property I missed. I wasn't able to find a comprehensive list of all Java properties used in Swing. There might be more properties for fonts. I someone knows it, tell us!

like image 66
Peter Kovac Avatar answered Nov 02 '22 13:11

Peter Kovac


Since version 3.1 from JMeter you can do that by modifying user.properties as per this doc:

  • http://jmeter.apache.org/usermanual/hints_and_tips.html#hidpi

jmeter.hidpi.mode set to true to activate a 'pseudo'-hidpi mode allowing to increase size of some UI elements jmeter.hidpi.scale.factor set to 2.0 to scale the size of some UI elements

jmeter.toolbar.icons.size with these values: 22x22 (default size), 32x32 or 48x48 (Suggested value for HiDPI) jmeter.tree.icons.size with these values: 19x19 (default size), 24x24, 32x32 (Suggested value for HiDPI) or 48x48 Additionally you can increase the font size of the text areas in some elements like JSR223 sampler by changing theses properties:

jsyntaxtextarea.font.family set to Hack to activate and to change the font and their size jsyntaxtextarea.font.size set to a greater value, like 28 (Suggested value for HiDPI)

Note you can also zoom in/out by using CTRL +/-

like image 35
UBIK LOAD PACK Avatar answered Nov 02 '22 12:11

UBIK LOAD PACK


On Ubuntu do the following:

  • Open bin/user.properties in Jmeter's installation directory (mine was ~/apache-jmeter-5.2.1).

  • Add the following lines at the end of the file:

    jmeter.hidpi.mode=true

    jmeter.hidpi.scale.factor=2.0

    jmeter.toolbar.icons.size=48x48

    jmeter.tree.icons.size=48x48

    jsyntaxtextarea.font.family=Hack

    jsyntaxtextarea.font.size=28

    swing.plaf.metal.controlFont=Dialog-20

    swing.plaf.metal.systemFont=Dialog-20

    swing.plaf.metal.userFont=SansSerif-18

    swing.plaf.metal.smallFont=SansSerif-16

    swing.plaf.metal.controlFont=Dialog-32

    swing.plaf.metal.systemFont=Dialog-32

    swing.plaf.metal.userFont=SansSerif-20

    swing.plaf.metal.smallFont=SansSerif-20

  • Save the file

  • Open Jmeter and go to Options -> Look and Feel -> Metal

  • Restart Jmeter

like image 4
Hussein Hijazi Avatar answered Nov 02 '22 12:11

Hussein Hijazi