SV: JMC-4613 - Thread name striked out

Marcus Hirt marcus at hirt.se
Fri Apr 12 13:35:15 UTC 2019


Looks good Alex! Thank you for the contribution!

Kind regards,
Marcus

-----Ursprungligt meddelande-----
Från: jmc-dev <jmc-dev-bounces at openjdk.java.net> För Alex Macdonald
Skickat: den 9 april 2019 21:14
Till: jmc-dev at openjdk.java.net
Ämne: RFR: JMC-4613 - Thread name striked out

Hi,

The following webrev [0] addresses issue JMC-4613 [1], in which the line drawn when hovering a thread lane on the Jfr Threads page could intersect the name label for the thread.

The problem here was the vertical offset for displaying the thread name was always given the value of 4. However, this could be insufficient for a number of reasons, the first being that when viewing a few threads 1 to ~4 it didn't offer enough clearance for when the mouse hovers a thread lane - the bottom of the lane extender clips the name of the thread [2].
Additionally, when there are a lot of threads on the page the labels can be hard to read because there is no guarantee as to whether or not they will be displayed in the middle of the row, or at the bottom of the row [3].

To amend this, a new vertical offset value is used in the cases where a horizontal line is displayed under the thread name. This value if roughly half the height of the string, and gives enough clearance to not get intersected [4]. Additionally, when there are no line separators being drawn the thread names will now be drawn in the middle of the row, which should make them line up better with their respective lanes [5] and improve readability when there are many threads on the chart [6].

Lastly, the thread names were previously only printed to the screen if the height of their row was greater than 20 units. However, there could be instances where there was enough space to display the names, as seen in the comparison picture [7].

Thoughts?

Cheers,

Alex

[0] http://cr.openjdk.java.net/~aptmac/JMC-4613/webrev.00/
[1] https://bugs.openjdk.java.net/browse/JMC-4613
[2] https://imgur.com/RGpn4qS
[3] https://imgur.com/RiPEyui
[4] https://imgur.com/6bXzT6g
[5] https://imgur.com/qhFBbNz
[6] https://imgur.com/VByL3zQ
[7] https://imgur.com/JASaq2n



More information about the jmc-dev mailing list