Class Metrics
java.lang.Object
com.erudika.para.core.metrics.Metrics
Helper methods for working with performance metrics.
- Author:
- Alex Bogdanovski [[email protected]]
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAn auto-closeable class that manages timers for both the overall system as well as specific application. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the default system @{link MetricRegistry}. -
Method Summary
Modifier and TypeMethodDescriptionstatic com.codahale.metrics.CounterCreates a new counter for a particular class and method for a specific application.static StringgetClassName(Class<?> clazz) static Metrics.ContextInstantiate timing of a particular class and method for a specific application.
-
Field Details
-
SYSTEM_METRICS_NAME
The name of the default system @{link MetricRegistry}.- See Also:
-
-
Method Details
-
time
Instantiate timing of a particular class and method for a specific application.- Parameters:
appid- the application that invoked the requestclazz- the Class to be timednames- one or more unique names to identify the timer - usually a method name- Returns:
- a closeable context that encapsulates the timed method
-
counter
Creates a new counter for a particular class and method for a specific application.- Parameters:
appid- the application that invoked the requestclazz- the Class to be countednames- one or more unique names to identify the counter - usually a method name- Returns:
- a counter
-
getClassName
-