Example usage for com.amazonaws.services.cloudwatch.model Datapoint getSampleCount

List of usage examples for com.amazonaws.services.cloudwatch.model Datapoint getSampleCount

Introduction

In this page you can find the example usage for com.amazonaws.services.cloudwatch.model Datapoint getSampleCount.

Prototype


public Double getSampleCount() 

Source Link

Document

The number of metric values that contributed to the aggregate value of this data point.

Usage

From source file:com.appdynamics.extensions.cloudwatch.metricsmanager.MetricsManager.java

License:Apache License

protected Double getValue(String namespace, String metricName, Datapoint data) {
    MetricType type = getMetricType(namespace, metricName);
    Double value = null;// ww  w .  j a  v  a 2  s. c  o m

    switch (type) {
    case AVE:
        value = data.getAverage();
        break;
    case MAX:
        value = data.getMaximum();
        break;
    case MIN:
        value = data.getMinimum();
        break;
    case SUM:
        value = data.getSum();
        break;
    case SAMPLE_COUNT:
        value = data.getSampleCount();
        break;
    }

    return value;
}