RFR: 7879: Automated Analysis taking very long time to produce results for Class Leak Rule and showing wrong results.

Suchita Chaturvedi schaturvedi at openjdk.org
Wed Oct 5 10:38:29 UTC 2022


On Wed, 28 Sep 2022 17:25:03 GMT, Henrik Dafgård <hdafgard at openjdk.org> wrote:

>> This PR takes care of optimizing and correcting the Class leak rule results on Automated Analysis Page.
>
> core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/general/ClassLeakingRule.java line 156:
> 
>> 154: 		IItemCollection items, IPreferenceValueProvider valueProvider, IResultValueProvider dependencyResults) {
>> 155: 		int warningLimit = (int) valueProvider.getPreferenceValue(WARNING_LIMIT).longValue();
>> 156: 		CONFIGURED_TIMEOUT = (int) valueProvider.getPreferenceValue(MAX_TIMEOUT).longValue();
> 
> Nit: This preference should use .clampedLongValueIn and passing in the appropriate unit, so since the timeout use of this specifies TimeUnit.MINUTES we should use valueProvider.getPreferenceValue(MAX_TIMEOUT).clampedLongValueIn(UnitLookup.MINUTE).longValue().

If we use clampedLongValueIn then longValue() should be removed right? We can't use both together.

-------------

PR: https://git.openjdk.org/jmc/pull/419


More information about the jmc-dev mailing list