Modifier and Type | Class and Description |
---|---|
private class |
MethodProfilingRule.MethodProfilingCallable
Private Callable implementation specifically used to avoid storing the FutureTask as a field.
|
private static class |
MethodProfilingRule.MethodProfilingWindowResult |
private static class |
MethodProfilingRule.PeriodRangeMap
A simple class for storing execution sample period settings, allowing the sliding window to
get the correct samples for each time slice.
|
Modifier and Type | Field and Description |
---|---|
private static java.util.List<TypedPreference<?>> |
CONFIG_ATTRIBUTES |
static TypedPreference<java.lang.String> |
EXCLUDED_PACKAGE_REGEXP |
private static int |
MAX_STACK_DEPTH
Constant value of the maximum number of stack frames to display for the hottest path.
|
private static java.lang.String |
RESULT_ID |
private static double |
SAMPLES_PER_PERIOD
Constant value of the maximum number of samples the JVM attempts per sampling period.
|
static TypedPreference<IQuantity> |
WINDOW_SIZE |
Constructor and Description |
---|
MethodProfilingRule() |
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
buildResultList(java.util.Map<IMCStackTrace,MethodProfilingRule.MethodProfilingWindowResult> percentByMethod) |
private SlidingWindowToolkit.IUnorderedWindowVisitor |
createWindowVisitor(MethodProfilingRule.PeriodRangeMap settings,
IItemFilter settingsFilter,
IQuantity windowSize,
java.util.List<MethodProfilingRule.MethodProfilingWindowResult> rawScores,
java.util.concurrent.FutureTask<Result> evaluationTask,
java.util.regex.Pattern excludes)
Creates an IUnorderedWindowVisitor that is called on each slice in the recording and
generates the scores for each slice and places them in the rawScores list.
|
java.util.concurrent.RunnableFuture<Result> |
evaluate(IItemCollection items,
IPreferenceValueProvider valueProvider)
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.String |
getId() |
private Pair<MethodProfilingRule.MethodProfilingWindowResult,java.util.Map<IMCStackTrace,MethodProfilingRule.MethodProfilingWindowResult>> |
getInterestingMethods(java.util.List<MethodProfilingRule.MethodProfilingWindowResult> windowResults) |
java.lang.String |
getName() |
private Result |
getResult(IItemCollection items,
IPreferenceValueProvider valueProvider,
java.util.concurrent.FutureTask<Result> evaluationTask) |
java.lang.String |
getTopic() |
private IQuantity |
getValueQuantity(java.lang.String settingValue)
Used to parse the value of a Recording Setting Period attribute
|
private double |
performSigmoidMap(double input) |
private void |
populateSettingsMap(IItemCollection items,
MethodProfilingRule.PeriodRangeMap settings)
Populates the settings map with all the period settings for the execution sample event found
in this recording.
|
private static final double SAMPLES_PER_PERIOD
private static final int MAX_STACK_DEPTH
private static final java.lang.String RESULT_ID
public static final TypedPreference<IQuantity> WINDOW_SIZE
public static final TypedPreference<java.lang.String> EXCLUDED_PACKAGE_REGEXP
private static final java.util.List<TypedPreference<?>> CONFIG_ATTRIBUTES
public java.util.concurrent.RunnableFuture<Result> evaluate(IItemCollection items, IPreferenceValueProvider valueProvider)
IRule
evaluate
in interface IRule
items
- items to evaluatevalueProvider
- Provider of configuration values used for evaluation. The attributes that will be
asked for from the provider should be provided by
IRule.getConfigurationAttributes()
.private Result getResult(IItemCollection items, IPreferenceValueProvider valueProvider, java.util.concurrent.FutureTask<Result> evaluationTask)
private java.lang.String buildResultList(java.util.Map<IMCStackTrace,MethodProfilingRule.MethodProfilingWindowResult> percentByMethod)
private Pair<MethodProfilingRule.MethodProfilingWindowResult,java.util.Map<IMCStackTrace,MethodProfilingRule.MethodProfilingWindowResult>> getInterestingMethods(java.util.List<MethodProfilingRule.MethodProfilingWindowResult> windowResults)
private double performSigmoidMap(double input)
private SlidingWindowToolkit.IUnorderedWindowVisitor createWindowVisitor(MethodProfilingRule.PeriodRangeMap settings, IItemFilter settingsFilter, IQuantity windowSize, java.util.List<MethodProfilingRule.MethodProfilingWindowResult> rawScores, java.util.concurrent.FutureTask<Result> evaluationTask, java.util.regex.Pattern excludes)
settings
- the settings map with all the times the execution sample event has a change of
periodicitysettingsFilter
- the filter used to select the recording setting for the execution sample eventwindowSize
- the size of the sliding windowrawScores
- the list of raw scores that will be populated by this visitorprivate void populateSettingsMap(IItemCollection items, MethodProfilingRule.PeriodRangeMap settings)
items
- the items to search for execution sample period eventssettings
- the map to populate with the eventsprivate IQuantity getValueQuantity(java.lang.String settingValue)
settingValue
- the value to parsepublic java.util.Collection<TypedPreference<?>> getConfigurationAttributes()
IRule
getConfigurationAttributes
in interface IRule
public java.lang.String getId()
public java.lang.String getName()