Class GcInvertedParallelismRule
java.lang.Object
org.openjdk.jmc.flightrecorder.rules.jdk.memory.GcInvertedParallelismRule
- All Implemented Interfaces:
- IRule
Rule that checks for "Inverted Parallelism", as described by the Garbagecat GC log analysis tool.
 Checks if the parallel collection performance is less than serial (single-threaded). See:
 https://github.com/mgm3746/garbagecat/blob/main/src/main/java/org/eclipselabs/garbagecat/util/jdk/JdkMath.java#L365
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final TypedResult<org.openjdk.jmc.common.unit.IQuantity>static final TypedResult<Long>
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic intcalcParallelism(long timeUser, long timeSys, long timeReal) Calculate parallelism, the ratio of user + sys to wall (real) time.createEvaluation(org.openjdk.jmc.common.item.IItemCollection items, org.openjdk.jmc.common.util.IPreferenceValueProvider valueProvider, IResultValueProvider resultProvider) Collection<org.openjdk.jmc.common.util.TypedPreference<?>>getId()getName()getTopic()static booleanisInvertedParallelism(int parallelism) 
- 
Field Details- 
GC_CPU_TIME_EVENT_COUNT
- 
INVERTED_PARALLELISM_COUNT
 
- 
- 
Constructor Details- 
GcInvertedParallelismRulepublic GcInvertedParallelismRule()
 
- 
- 
Method Details- 
createEvaluationpublic RunnableFuture<IResult> createEvaluation(org.openjdk.jmc.common.item.IItemCollection items, org.openjdk.jmc.common.util.IPreferenceValueProvider valueProvider, IResultValueProvider resultProvider) - Specified by:
- createEvaluationin interface- IRule
 
- 
calcParallelismpublic static int calcParallelism(long timeUser, long timeSys, long timeReal) Calculate parallelism, the ratio of user + sys to wall (real) time.- Parameters:
- timeUser- The user (non-kernel) time.
- timeSys- The sys (kernel) time.
- timeReal- The wall (clock) time.
- Returns:
- Percent user:real time rounded up the the nearest whole number.
 
- 
isInvertedParallelismpublic static boolean isInvertedParallelism(int parallelism) - Parameters:
- parallelism- The parallelism percent (ratio or user to wall (real time).
- Returns:
- True if the parallelism is "inverted", false otherwise. Inverted parallelism is less than 100. In other words, the parallel collection performance is less than serial (single-threaded).
 
- 
getConfigurationAttributes- Specified by:
- getConfigurationAttributesin interface- IRule
 
- 
getId
- 
getName
- 
getTopic
- 
getRequiredEvents- Specified by:
- getRequiredEventsin interface- IRule
 
- 
getResults- Specified by:
- getResultsin interface- IRule
 
 
-