Share via


MetricValue Class

  • java.lang.Object
    • com.azure.monitor.query.models.MetricValue

public final class MetricValue

Represents a metric value.

Constructor Summary

Constructor Description
MetricValue(OffsetDateTime timeStamp, Double average, Double minimum, Double maximum, Double total, Double count)

Creates an instance of MetricValue.

Method Summary

Modifier and Type Method and Description
Double getAverage()

Returns the average value in the time range.

Double getCount()

Returns the number of samples in the time range.

Double getMaximum()

Returns the greatest value in the time range.

Double getMinimum()

Returns the least value in the time range.

OffsetDateTime getTimeStamp()

Returns the timestamp for the metric value in ISO 8601 format.

Double getTotal()

Returns the sum of all of the values in the time range.

Methods inherited from java.lang.Object

Constructor Details

MetricValue

public MetricValue(OffsetDateTime timeStamp, Double average, Double minimum, Double maximum, Double total, Double count)

Creates an instance of MetricValue.

Parameters:

timeStamp - the timestamp for the metric value in ISO 8601 format.
average - the average value in the time range.
minimum - the least value in the time range.
maximum - the greatest value in the time range.
total - the sum of all of the values in the time range.
count - the number of samples in the time range.

Method Details

getAverage

public Double getAverage()

Returns the average value in the time range.

Returns:

the average value in the time range.

getCount

public Double getCount()

Returns the number of samples in the time range.

Returns:

the number of samples in the time range.

getMaximum

public Double getMaximum()

Returns the greatest value in the time range.

Returns:

the greatest value in the time range.

getMinimum

public Double getMinimum()

Returns the least value in the time range.

Returns:

the least value in the time range.

getTimeStamp

public OffsetDateTime getTimeStamp()

Returns the timestamp for the metric value in ISO 8601 format.

Returns:

the timestamp for the metric value in ISO 8601 format.

getTotal

public Double getTotal()

Returns the sum of all of the values in the time range.

Returns:

the sum of all of the values in the time range.

Applies to