List of usage examples for com.amazonaws.metrics ServiceLatencyProvider getServiceMetricType
public ServiceMetricType getServiceMetricType()
From source file:com.netflix.spectator.aws.SpectatorServiceMetricCollector.java
License:Apache License
@Override public void collectLatency(ServiceLatencyProvider provider) { if (provider.getServiceMetricType() == AWSServiceMetrics.HttpClientGetConnectionTime) { long nanos = (long) (provider.getDurationMilli() * 1e6); clientGetConnectionTime.record(nanos, TimeUnit.NANOSECONDS); }/*from ww w . j av a2s . c om*/ }