SV: JMC-4613 - Thread name striked out
marcus at hirt.se
Fri Apr 12 13:35:15 UTC 2019
Looks good Alex! Thank you for the contribution!
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
The following webrev  addresses issue JMC-4613 , 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 .
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 .
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 . 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  and improve readability when there are many threads on the chart .
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 .
More information about the jmc-dev