Class ContextSwitchRule
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.rules.jdk.latency.ContextSwitchRule
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.List<TypedPreference<?>>CONFIG_ATTRIBUTESstatic TypedPreference<IQuantity>CONTEXT_SWITCH_WARNING_LIMITprivate static IAggregator<IQuantity,?>MAX_BLOCKSprivate static java.lang.StringRESULT_ID
-
Constructor Summary
Constructors Constructor Description ContextSwitchRule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static longcalculateSwitchRate(IItemCollection switchItems)private Resultevaluate(IItemCollection items, long switchRateLimit)java.util.concurrent.RunnableFuture<Result>evaluate(IItemCollection items, IPreferenceValueProvider vp)Gets a future representing the result of the evaluation of this rule.java.util.Collection<TypedPreference<?>>getConfigurationAttributes()Gets information about which attributes may be configured during rule evaluation.java.lang.StringgetId()private static longgetMostBlocks(IItemCollection items)java.lang.StringgetName()java.lang.StringgetTopic()
-
-
-
Field Detail
-
CONTEXT_SWITCH_WARNING_LIMIT
public static final TypedPreference<IQuantity> CONTEXT_SWITCH_WARNING_LIMIT
-
CONFIG_ATTRIBUTES
private static final java.util.List<TypedPreference<?>> CONFIG_ATTRIBUTES
-
RESULT_ID
private static final java.lang.String RESULT_ID
- See Also:
- Constant Field Values
-
MAX_BLOCKS
private static final IAggregator<IQuantity,?> MAX_BLOCKS
-
-
Method Detail
-
evaluate
public java.util.concurrent.RunnableFuture<Result> evaluate(IItemCollection items, IPreferenceValueProvider vp)
Description copied from interface:IRuleGets a future representing the result of the evaluation of this rule. Running the RunnableFuture is the responsibility of the caller of this method, not the implementation.- Specified by:
evaluatein interfaceIRule- Parameters:
items- items to evaluatevp- Provider of configuration values used for evaluation. The attributes that will be asked for from the provider should be provided byIRule.getConfigurationAttributes().- Returns:
- a RunnableFuture that when run will return the evaluation result
-
evaluate
private Result evaluate(IItemCollection items, long switchRateLimit)
-
calculateSwitchRate
private static long calculateSwitchRate(IItemCollection switchItems)
-
getMostBlocks
private static long getMostBlocks(IItemCollection items)
-
getConfigurationAttributes
public java.util.Collection<TypedPreference<?>> getConfigurationAttributes()
Description copied from interface:IRuleGets information about which attributes may be configured during rule evaluation.- Specified by:
getConfigurationAttributesin interfaceIRule- Returns:
- a list of configuration attributes
-
getId
public java.lang.String getId()
-
getName
public java.lang.String getName()
-
-