Package com.amazonaws.metrics

Examples of com.amazonaws.metrics.ServiceMetricType


        return bytesPerSec;
    }
   
    private void collectByteThroughput0(ByteThroughputProvider provider) {
        final ThroughputMetricType throughputType = provider.getThroughputMetricType();
        final ServiceMetricType byteCountType = throughputType.getByteCountMetricType();
        final Set<MetricType> metrics = AwsSdkMetrics.getPredefinedMetrics();
        final double byteCount = provider.getByteCount();
        double durationNano = provider.getDurationNano();
        double bytesPerSec = bytesPerSecond(byteCount, durationNano);
        if (metrics.contains(throughputType)) {
            // Throughput metric
            final Dimension throughputDimension = new Dimension()
                .withName(Dimensions.MetricType.name())
                .withValue(throughputType.name());
            final MetricDatum throughputDatum = new MetricDatum()
                .withMetricName(throughputType.getServiceName())
                .withDimensions(throughputDimension)
                .withUnit(StandardUnit.BytesSecond)
                .withValue(bytesPerSec);
            safeAddMetricsToQueue(throughputDatum);
        }
        if (metrics.contains(byteCountType)) {
            // Byte count metric
            final Dimension byteCountDimension = new Dimension()
                .withName(Dimensions.MetricType.name())
                .withValue(byteCountType.name());
            final MetricDatum byteCountDatum = new MetricDatum()
                .withMetricName(byteCountType.getServiceName())
                .withDimensions(byteCountDimension)
                .withUnit(StandardUnit.Bytes)
                .withValue(byteCount);
            safeAddMetricsToQueue(byteCountDatum);
        }
View Full Code Here


        }
    }

    @Override
    public void collectLatency(ServiceLatencyProvider provider) {
        final ServiceMetricType type = provider.getServiceMetricType();
        final Set<MetricType> metrics = AwsSdkMetrics.getPredefinedMetrics();
        if (metrics.contains(type)) {
            final Dimension dim = new Dimension()
                .withName(Dimensions.MetricType.name())
                .withValue(type.name());
            final MetricDatum datum = new MetricDatum()
                .withMetricName(type.getServiceName())
                .withDimensions(dim)
                .withUnit(StandardUnit.Milliseconds)
                .withValue(provider.getDurationMilli());
            safeAddMetricsToQueue(datum);
        }
View Full Code Here

        return bytesPerSec;
    }
   
    private void collectByteThroughput0(ByteThroughputProvider provider) {
        final ThroughputMetricType throughputType = provider.getThroughputMetricType();
        final ServiceMetricType byteCountType = throughputType.getByteCountMetricType();
        final Set<MetricType> metrics = AwsSdkMetrics.getPredefinedMetrics();
        final double byteCount = provider.getByteCount();
        double durationNano = provider.getDurationNano();
        double bytesPerSec = bytesPerSecond(byteCount, durationNano);
        if (metrics.contains(throughputType)) {
            // Throughput metric
            final Dimension throughputDimension = new Dimension()
                .withName(Dimensions.MetricType.name())
                .withValue(throughputType.name());
            final MetricDatum throughputDatum = new MetricDatum()
                .withMetricName(throughputType.getServiceName())
                .withDimensions(throughputDimension)
                .withUnit(StandardUnit.BytesSecond)
                .withValue(bytesPerSec);
            addMetricsToQueue(throughputDatum);
        }
        if (metrics.contains(byteCountType)) {
            // Byte count metric
            final Dimension byteCountDimension = new Dimension()
                .withName(Dimensions.MetricType.name())
                .withValue(byteCountType.name());
            final MetricDatum byteCountDatum = new MetricDatum()
                .withMetricName(byteCountType.getServiceName())
                .withDimensions(byteCountDimension)
                .withUnit(StandardUnit.Bytes)
                .withValue(byteCount);
            addMetricsToQueue(byteCountDatum);
        }
View Full Code Here

        }
    }

    @Override
    public void collectLatency(ServiceLatencyProvider provider) {
        final ServiceMetricType type = provider.getServiceMetricType();
        final Set<MetricType> metrics = AwsSdkMetrics.getPredefinedMetrics();
        if (metrics.contains(type)) {
            final Dimension dim = new Dimension()
                .withName(Dimensions.MetricType.name())
                .withValue(type.name());
            final MetricDatum datum = new MetricDatum()
                .withMetricName(type.getServiceName())
                .withDimensions(dim)
                .withUnit(StandardUnit.Milliseconds)
                .withValue(provider.getDurationMilli());
            addMetricsToQueue(datum);
        }
View Full Code Here

        return bytesPerSec;
    }
   
    private void collectByteThroughput0(ByteThroughputProvider provider) {
        final ThroughputMetricType throughputType = provider.getThroughputMetricType();
        final ServiceMetricType byteCountType = throughputType.getByteCountMetricType();
        final Set<MetricType> metrics = AwsSdkMetrics.getPredefinedMetrics();
        final double byteCount = provider.getByteCount();
        double durationNano = provider.getDurationNano();
        double bytesPerSec = bytesPerSecond(byteCount, durationNano);
        if (metrics.contains(throughputType)) {
            // Throughput metric
            final Dimension throughputDimension = new Dimension()
                .withName(Dimensions.MetricType.name())
                .withValue(throughputType.name());
            final MetricDatum throughputDatum = new MetricDatum()
                .withMetricName(throughputType.getServiceName())
                .withDimensions(throughputDimension)
                .withUnit(StandardUnit.BytesSecond)
                .withValue(bytesPerSec);
            addMetricsToQueue(throughputDatum);
        }
        if (metrics.contains(byteCountType)) {
            // Byte count metric
            final Dimension byteCountDimension = new Dimension()
                .withName(Dimensions.MetricType.name())
                .withValue(byteCountType.name());
            final MetricDatum byteCountDatum = new MetricDatum()
                .withMetricName(byteCountType.getServiceName())
                .withDimensions(byteCountDimension)
                .withUnit(StandardUnit.Bytes)
                .withValue(byteCount);
            addMetricsToQueue(byteCountDatum);
        }
View Full Code Here

        }
    }

    @Override
    public void collectLatency(ServiceLatencyProvider provider) {
        final ServiceMetricType type = provider.getServiceMetricType();
        final Set<MetricType> metrics = AwsSdkMetrics.getPredefinedMetrics();
        if (metrics.contains(type)) {
            final Dimension dim = new Dimension()
                .withName(Dimensions.MetricType.name())
                .withValue(type.name());
            final MetricDatum datum = new MetricDatum()
                .withMetricName(type.getServiceName())
                .withDimensions(dim)
                .withUnit(StandardUnit.Milliseconds)
                .withValue(provider.getDurationMilli());
            addMetricsToQueue(datum);
        }
View Full Code Here

TOP

Related Classes of com.amazonaws.metrics.ServiceMetricType

Copyright © 2018 www.massapicom. 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.