Package com.wavefront.agent.preprocessor
Class PreprocessorRuleMetrics
- java.lang.Object
-
- com.wavefront.agent.preprocessor.PreprocessorRuleMetrics
-
public class PreprocessorRuleMetrics extends Object
A helper class for instrumenting preprocessor rules. Tracks two counters: number of times the rule has been successfully applied, and counter of CPU time (nanos) spent on applying the rule to troubleshoot possible performance issues.- Author:
- [email protected]
-
-
Constructor Summary
Constructors Constructor Description PreprocessorRuleMetrics(com.yammer.metrics.core.Counter ruleAppliedCounter, com.yammer.metrics.core.Counter ruleCpuTimeNanosCounter, com.yammer.metrics.core.Counter ruleCheckedCounter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
incrementRuleAppliedCounter()
Increment ruleAppliedCounter (if available) by 1void
ruleEnd(long ruleStartTime)
Measure rule execution time and add it to ruleCpuTimeNanosCounter (if available)long
ruleStart()
Mark rule start time, increment ruleCheckedCounter (if available) by 1
-
-
-
Method Detail
-
incrementRuleAppliedCounter
public void incrementRuleAppliedCounter()
Increment ruleAppliedCounter (if available) by 1
-
ruleEnd
public void ruleEnd(long ruleStartTime)
Measure rule execution time and add it to ruleCpuTimeNanosCounter (if available)- Parameters:
ruleStartTime
- rule start time
-
ruleStart
public long ruleStart()
Mark rule start time, increment ruleCheckedCounter (if available) by 1- Returns:
- start time in nanos
-
-