java.lang.Object
org.apache.wicket.metrics.WicketMetrics
- Direct Known Subclasses:
BehaviorCreateAspect
,ComponentCreateAspect
,ComponentOnConfigureAspect
,ComponentOnDetachAspect
,ComponentOnInitializeAspect
,ComponentOnRenderAspect
,ComponentSetResponsePageAspect
,IPartialPageRequestHandlerAddAspect
,IPartialPageRequestHandlerAppendJavaScriptAspect
,IPartialPageRequestHandlerPrependJavaScriptAspect
,IRequestHandlerDetachAspect
,IRequestHandlerRespondAspect
,IResourceCreateAspect
,LoadableDetachableModelLoadAspect
,ResourceReferenceCreateAspect
,SessionCountListenerAspect
,WicketFilterRequestCycleAspect
,WicketFilterRequestCycleUrlAspect
,WicketTagCreateAspect
Base aspect provides access to the metric registry
- Author:
- Tobias Soloschenko
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final MetaDataKey<com.codahale.metrics.MetricRegistry>
The key for metrics registrystatic final MetaDataKey<WicketMetricsSettings>
The key for metrics registry -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncount
(String name, org.aspectj.lang.ProceedingJoinPoint joinPoint, WicketMetrics.CounterOperation counterOperation, Long value) Creates a count of the given argumentsstatic String
Gets the filter name the application should be resolved withstatic com.codahale.metrics.MetricRegistry
Gets the metric registrystatic WicketMetricsSettings
Gets the wicket metrics settingsMarks the meter with the given namemeasureTime
(String name, org.aspectj.lang.ProceedingJoinPoint joinPoint) Simply measure the time for a @aroundmeasureTime
(String name, org.aspectj.lang.ProceedingJoinPoint joinPoint, boolean renderClass) Simply measure the time for a @aroundrenderClassName
(org.aspectj.lang.ProceedingJoinPoint joinPoint) Renders the class name of the given join pointstatic void
setFilterName
(String filterName) Sets the filter name the application should be resolved withvoid
stopQuietly
(com.codahale.metrics.Timer.Context context) Stops the context quietly
-
Field Details
-
METRIC_REGISTRY
The key for metrics registry -
METRIC_SETTINGS
The key for metrics registry
-
-
Constructor Details
-
WicketMetrics
public WicketMetrics()
-
-
Method Details
-
measureTime
public Object measureTime(String name, org.aspectj.lang.ProceedingJoinPoint joinPoint) throws Throwable Simply measure the time for a @around- Parameters:
name
- the name of the timer contextjoinPoint
- the joinPoint to be proceed- Returns:
- the value of the join point
- Throws:
Throwable
- if there is an exception while execution- See Also:
-
measureTime
public Object measureTime(String name, org.aspectj.lang.ProceedingJoinPoint joinPoint, boolean renderClass) throws Throwable Simply measure the time for a @around- Parameters:
name
- the name of the timer contextjoinPoint
- the joinPoint to be proceedrenderClass
- if the class name should be rendered behind the metric path- Returns:
- the value of the join point
- Throws:
Throwable
- if there is an exception while execution
-
stopQuietly
Stops the context quietly- Parameters:
context
- the context to stop
-
count
public Object count(String name, org.aspectj.lang.ProceedingJoinPoint joinPoint, WicketMetrics.CounterOperation counterOperation, Long value) throws Throwable Creates a count of the given arguments- Parameters:
name
- the name of the meter to be markedjoinPoint
- the join pointcounterOperation
- the operationvalue
- the value to update the counter- Returns:
- the result of the proceeded join point
- Throws:
Throwable
-
mark
Marks the meter with the given name- Parameters:
name
- the name of the meter to be markedjoinPoint
- the join point- Returns:
- the result of the proceeded join point
- Throws:
Throwable
-
renderClassName
Renders the class name of the given join point- Parameters:
joinPoint
- the join point to get the class of- Returns:
- the class name representation
-
getMetricRegistry
Gets the metric registry- Returns:
- the metric registry
-
getSettings
Gets the wicket metrics settings- Returns:
- the wicket metrics settings
-
getFilterName
Gets the filter name the application should be resolved with- Returns:
- the filter name
-
setFilterName
Sets the filter name the application should be resolved with- Parameters:
filterName
- the filter name
-