Examples of KPITimer


Examples of com.betfair.tornjak.kpi.KPITimer


    @Around("@annotation(kpiTimedEvent)")
    public Object measureDuration(final ProceedingJoinPoint pjp, KPITimedEvent kpiTimedEvent) throws Throwable {

        KPITimer timer = new KPITimer();
        boolean succeeded = true;
        try {
            timer.start();
            return pjp.proceed();

        } catch(Throwable t) {
            succeeded = false;
            throw t;

        } finally {
            // this looks like a reasonable and clean place to stop the clock, even if we've wasted a few nanos before
            //  we actually get here
            double duration = timer.stop();
            final String eventValue = kpiTimedEvent.value();
            final String name = eventValue.isEmpty() ? pjp.getTarget().getClass().getSimpleName() : eventValue;
            final String operation = kpiTimedEvent.operation().isEmpty() ? pjp.getSignature().getName() : kpiTimedEvent.operation();

            if (kpiTimedEvent.catchFailures()) {
View Full Code Here

Examples of com.betfair.tornjak.kpi.KPITimer

        final String eventValue = event.value();
        final String eventOperation = event.operation();
        final String name = eventValue.isEmpty() ? pjp.getTarget().getClass().getSimpleName() : eventValue;
        final String operation = eventOperation.isEmpty() ? pjp.getSignature().getName() : eventOperation;

        final KPITimer timer = new KPITimer();
        timer.start();
        final PerformanceMonitoringExecutionObserver perfObserver =
                new PerformanceMonitoringExecutionObserver(observer, monitor, timer,
                                                           event.catchFailures(), name, operation);

        return pjp.proceed(replaceObserver(perfObserver, pjp.getArgs()));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.