SV: JMC-6324: Values in Method Profiling rule result text not correct when filtering

Marcus Hirt marcus at hirt.se
Mon Jan 28 13:40:27 UTC 2019


Hi Josh,

Looks good! Perhaps the percentage shown for the most interesting 
candidate should be updated to show the percentage of the actual 
samples taken? This is since the normalization bars we show as 
backdrop in some columns is in regards to actual events. I think we 
only need to drop the relation to the theoretical maximum amount of 
samples in the user's head once, and only to motivate a lower score 
than expected.

For example:
The following methods are the most interesting candidates for code optimization: 
•se.hirt.jmc.tutorial.hotmethods.HolderOfUniqueValues.countIntersection(HolderOfUniqueValues) (24,1 %) 2018-11-09 14:40:39 – 14:41:09
->
The following methods are the most interesting candidates for code optimization: 
•se.hirt.jmc.tutorial.hotmethods.HolderOfUniqueValues.countIntersection(HolderOfUniqueValues) (98,2 %) 2018-11-09 14:40:39 – 14:41:09

or possible more verbosely:
The following methods are the most interesting candidates for code optimization: 
•se.hirt.jmc.tutorial.hotmethods.HolderOfUniqueValues.countIntersection(HolderOfUniqueValues) (98,2 % of the samples) 2018-11-09 14:40:39 – 14:41:09

Kind regards,
Marcus

-----Ursprungligt meddelande-----
Från: jmc-dev <jmc-dev-bounces at openjdk.java.net> För Joshua Matsuoka
Skickat: den 25 januari 2019 17:46
Till: jmc-dev at openjdk.java.net
Ämne: RFR: JMC-6324: Values in Method Profiling rule result text not correct when filtering

Hi,

The following patch adds some extra clarity to the Method Profiling rule.

Currently the percentage reported by the Method Profiling rule is the percentage of all possible samples in a given period, rather than the actual number of samples. This can lead to some rather misleading results when for example a method takes up 99% of the actual samples in a window, but only constitutes 25% of the theoretical maximum number of samples.

This patch keeps track of both the relation to the maximum, as well as the actual percentage of samples and reports both with the rule results (e.g.
Method x had y% of possible samples and z% of actual samples)

http://cr.openjdk.java.net/~jmatsuoka/JMC-6324/webrev.00/

Thoughts?

Cheers,

- Josh



More information about the jmc-dev mailing list