| Class | AWS::CloudWatch::MetricStatistics |
| In: |
lib/aws/cloud_watch/metric_statistics.rb
|
| Parent: | Object |
Statistics for a metric.
This class is an enumerable collection of data points.
## Enumerating Statistics
metric = CloudWatch::Metric.new('my/namepace', 'metric-name')
stats = metric.statistics(
:start_time => Time.now - 3600,
:end_time => Time.now,
:statistics => ['Average'])
stats.label #=> 'some-label'
stats.each do |datapoint|
# datapoint is a hash
end
@see Core::Collection