Example usage for com.amazonaws.metrics ServiceLatencyProvider getDurationMilli

List of usage examples for com.amazonaws.metrics ServiceLatencyProvider getDurationMilli

Introduction

In this page you can find the example usage for com.amazonaws.metrics ServiceLatencyProvider getDurationMilli.

Prototype

public double getDurationMilli() 

Source Link

Usage

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   w  w  w  .  j a  v  a  2  s.c o  m
}