1 package com.griddynamics.jagger.engine.e1.collector.invocation;
3 import com.griddynamics.jagger.engine.e1.Provider;
4 import com.griddynamics.jagger.engine.e1.collector.AvgMetricAggregatorProvider;
5 import com.griddynamics.jagger.engine.e1.collector.MaxMetricAggregatorProvider;
6 import com.griddynamics.jagger.engine.e1.collector.MetricDescription;
7 import com.griddynamics.jagger.engine.e1.collector.MinMetricAggregatorProvider;
8 import com.griddynamics.jagger.engine.e1.collector.PercentileAggregatorProvider;
9 import com.griddynamics.jagger.engine.e1.collector.invocation.InvocationInfo;
10 import com.griddynamics.jagger.engine.e1.collector.invocation.InvocationListener;
11 import com.griddynamics.jagger.engine.e1.services.ServicesAware;
12 import com.griddynamics.jagger.invoker.InvocationException;
24 private final String metricName =
"example-duration-metric";
31 .displayName(
"Example duration metric, ms")
51 return new InvocationListener() {
53 public void onStart(InvocationInfo invocationInfo) { }
56 public void onSuccess(InvocationInfo invocationInfo) {
57 if (invocationInfo.getResult() != null) {
58 getMetricService().saveValue(metricName, invocationInfo.getDuration());
63 public void onFail(InvocationInfo invocationInfo, InvocationException e) { }
66 public void onError(InvocationInfo invocationInfo, Throwable error) { }