Package org.apache.juneau.rest.stats
Class MethodExecStats
java.lang.Object
org.apache.juneau.rest.stats.MethodExecStats
Method execution statistics.
 Keeps track of number of starts/finishes on tasks and keeps an average run time.
 
See Also:
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedMethodExecStats(MethodExecStats.Builder builder) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionstatic MethodExecStats.BuilderStatic creator.Call when an error occurs.finished(long nanoTime) Call when task is finished.intReturns the average execution time.intReturns the number of times theerror(Throwable)method was called.longgetGuid()Returns a globally unique ID for this object.intReturns the max execution time.Returns the method name of these stats.intReturns the max execution time.intReturns the number currently running method invocations.intgetRuns()Returns the number of times thestarted()method was called.Returns information on all stack traces of all exceptions encountered.longReturns the total execution time.started()Call when task is started.toString()
- 
Constructor Details- 
MethodExecStatsConstructor.- Parameters:
- builder- The builder for this object.
 
 
- 
- 
Method Details- 
createStatic creator.- Parameters:
- beanStore- The bean store to use for creating beans.
- Returns:
- A new builder for this object.
 
- 
startedCall when task is started.- Returns:
- This object.
 
- 
finishedCall when task is finished.- Parameters:
- nanoTime- The execution time of the task in nanoseconds.
- Returns:
- This object.
 
- 
errorCall when an error occurs.- Parameters:
- e- The exception thrown. Can be- null .
- Returns:
- This object.
 
- 
getGuidReturns a globally unique ID for this object.A random long generated during the creation of this object. Allows this object to be differentiated from other similar objects in multi-node environments so that statistics can be reliably stored in a centralized location. - Returns:
- The globally unique ID for this object.
 
- 
getMethodReturns the method name of these stats.- Returns:
- The method name of these stats.
 
- 
getRunsReturns the number of times thestarted()method was called.- Returns:
- The number of times the started()method was called.
 
- 
getRunningReturns the number currently running method invocations.- Returns:
- The number of currently running method invocations.
 
- 
getErrorsReturns the number of times theerror(Throwable)method was called.- Returns:
- The number of times the error(Throwable)method was called.
 
- 
getMinTimeReturns the max execution time.- Returns:
- The average execution time in milliseconds.
 
- 
getMaxTimeReturns the max execution time.- Returns:
- The average execution time in milliseconds.
 
- 
getAvgTimeReturns the average execution time.- Returns:
- The average execution time in milliseconds.
 
- 
getTotalTimeReturns the total execution time.- Returns:
- The total execution time in milliseconds.
 
- 
getThrownStoreReturns information on all stack traces of all exceptions encountered.- Returns:
- Information on all stack traces of all exceptions encountered.
 
- 
toString
 
-