Package io.prometheus.client.spring.web
Class MethodTimer
- java.lang.Object
-
- io.prometheus.client.spring.web.MethodTimer
-
@Scope("prototype") @ControllerAdvice public class MethodTimer extends ObjectThis class automatically times (via aspectj) the execution of annotated methods, if it's been enabled viaEnablePrometheusTiming, for methods annotated withPrometheusTimeMethod- Author:
- Andrew Stuart
-
-
Constructor Summary
Constructors Constructor Description MethodTimer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidannotatedMethod()voidtimeable()ObjecttimeMethod(org.aspectj.lang.ProceedingJoinPoint pjp)
-
-
-
Constructor Detail
-
MethodTimer
public MethodTimer()
-
-
Method Detail
-
annotatedMethod
public void annotatedMethod()
-
timeable
public void timeable()
-
timeMethod
public Object timeMethod(org.aspectj.lang.ProceedingJoinPoint pjp) throws Throwable
- Throws:
Throwable
-
-