Class: AWSCDK::CloudWatch::Stats
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::CloudWatch::Stats
- Defined in:
- cloud_watch/stats.rb
Overview
Factory functions for standard statistics strings.
Class Method Summary collapse
-
.AVERAGE ⇒ String
The value of Sum / SampleCount during the specified period.
-
.IQM ⇒ String
Interquartile mean (IQM) is the trimmed mean of the interquartile range, or the middle 50% of values.
- .jsii_overridable_methods ⇒ Object
-
.MAXIMUM ⇒ String
The highest value observed during the specified period.
-
.MINIMUM ⇒ String
The lowest value observed during the specified period.
-
.p(percentile) ⇒ String
A shorter alias for
percentile(). -
.percentile(percentile) ⇒ String
Percentile indicates the relative standing of a value in a dataset.
-
.percentile_rank(v1, v2 = nil) ⇒ String
Percentile rank (PR) is the percentage of values that meet a fixed threshold.
-
.pr(v1, v2 = nil) ⇒ String
Shorter alias for
percentileRank(). -
.SAMPLE_COUNT ⇒ String
The count (number) of data points used for the statistical calculation.
-
.SUM ⇒ String
All values submitted for the matching metric added together.
-
.tc(p1, p2 = nil) ⇒ String
Shorter alias for
trimmedCount(). -
.tm(p1, p2 = nil) ⇒ String
A shorter alias for
trimmedMean(). -
.trimmed_count(p1, p2 = nil) ⇒ String
Trimmed count (TC) is the number of data points in the chosen range for a trimmed mean statistic.
-
.trimmed_mean(p1, p2 = nil) ⇒ String
Trimmed mean (TM) is the mean of all values that are between two specified boundaries.
-
.trimmed_sum(p1, p2 = nil) ⇒ String
Trimmed sum (TS) is the sum of the values of data points in a chosen range for a trimmed mean statistic.
-
.ts(p1, p2 = nil) ⇒ String
Shorter alias for
trimmedSum(). -
.winsorized_mean(p1, p2 = nil) ⇒ String
Winsorized mean (WM) is similar to trimmed mean.
-
.wm(p1, p2 = nil) ⇒ String
A shorter alias for
winsorizedMean().
Instance Method Summary collapse
-
#initialize ⇒ Stats
constructor
A new instance of Stats.
Constructor Details
#initialize ⇒ Stats
Returns a new instance of Stats.
8 9 10 |
# File 'cloud_watch/stats.rb', line 8 def initialize Jsii::Object.instance_method(:initialize).bind(self).call end |
Class Method Details
.AVERAGE ⇒ String
The value of Sum / SampleCount during the specified period.
217 218 219 |
# File 'cloud_watch/stats.rb', line 217 def self.AVERAGE() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_cloudwatch.Stats", "AVERAGE") end |
.IQM ⇒ String
Interquartile mean (IQM) is the trimmed mean of the interquartile range, or the middle 50% of values.
It is equivalent to trimmed_mean(25, 75).
226 227 228 |
# File 'cloud_watch/stats.rb', line 226 def self.IQM() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_cloudwatch.Stats", "IQM") end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 |
# File 'cloud_watch/stats.rb', line 12 def self.jsii_overridable_methods { } end |
.MAXIMUM ⇒ String
The highest value observed during the specified period.
You can use this value to determine high volumes of activity for your application.
235 236 237 |
# File 'cloud_watch/stats.rb', line 235 def self.MAXIMUM() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_cloudwatch.Stats", "MAXIMUM") end |
.MINIMUM ⇒ String
The lowest value observed during the specified period.
You can use this value to determine low volumes of activity for your application.
244 245 246 |
# File 'cloud_watch/stats.rb', line 244 def self.MINIMUM() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_cloudwatch.Stats", "MINIMUM") end |
.p(percentile) ⇒ String
A shorter alias for percentile().
21 22 23 24 |
# File 'cloud_watch/stats.rb', line 21 def self.p(percentile) Jsii::Type.check_type(percentile, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "percentile") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.Stats", "p", [percentile]) end |
.percentile(percentile) ⇒ String
Percentile indicates the relative standing of a value in a dataset.
Percentiles help you get a better understanding of the distribution of your metric data.
For example, p(90) is the 90th percentile and means that 90% of the data
within the period is lower than this value and 10% of the data is higher
than this value.
36 37 38 39 |
# File 'cloud_watch/stats.rb', line 36 def self.percentile(percentile) Jsii::Type.check_type(percentile, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "percentile") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.Stats", "percentile", [percentile]) end |
.percentile_rank(v1, v2 = nil) ⇒ String
Percentile rank (PR) is the percentage of values that meet a fixed threshold.
- If two numbers are given, they define the lower and upper bounds in absolute values, respectively.
- If one number is given, it defines the upper bound (the lower bound is assumed to be 0).
For example, percentile_rank(300) returns the percentage of data points that have a value of 300 or less.
percentile_rank(100, 2000) returns the percentage of data points that have a value between 100 and 2000.
54 55 56 57 58 |
# File 'cloud_watch/stats.rb', line 54 def self.percentile_rank(v1, v2 = nil) Jsii::Type.check_type(v1, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "v1") Jsii::Type.check_type(v2, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "v2") unless v2.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.Stats", "percentileRank", [v1, v2]) end |
.pr(v1, v2 = nil) ⇒ String
Shorter alias for percentileRank().
65 66 67 68 69 |
# File 'cloud_watch/stats.rb', line 65 def self.pr(v1, v2 = nil) Jsii::Type.check_type(v1, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "v1") Jsii::Type.check_type(v2, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "v2") unless v2.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.Stats", "pr", [v1, v2]) end |
.SAMPLE_COUNT ⇒ String
The count (number) of data points used for the statistical calculation.
251 252 253 |
# File 'cloud_watch/stats.rb', line 251 def self.SAMPLE_COUNT() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_cloudwatch.Stats", "SAMPLE_COUNT") end |
.SUM ⇒ String
All values submitted for the matching metric added together.
This statistic can be useful for determining the total volume of a metric.
260 261 262 |
# File 'cloud_watch/stats.rb', line 260 def self.SUM() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_cloudwatch.Stats", "SUM") end |
.tc(p1, p2 = nil) ⇒ String
Shorter alias for trimmedCount().
76 77 78 79 80 |
# File 'cloud_watch/stats.rb', line 76 def self.tc(p1, p2 = nil) Jsii::Type.check_type(p1, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "p1") Jsii::Type.check_type(p2, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "p2") unless p2.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.Stats", "tc", [p1, p2]) end |
.tm(p1, p2 = nil) ⇒ String
A shorter alias for trimmedMean().
87 88 89 90 91 |
# File 'cloud_watch/stats.rb', line 87 def self.tm(p1, p2 = nil) Jsii::Type.check_type(p1, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "p1") Jsii::Type.check_type(p2, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "p2") unless p2.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.Stats", "tm", [p1, p2]) end |
.trimmed_count(p1, p2 = nil) ⇒ String
Trimmed count (TC) is the number of data points in the chosen range for a trimmed mean statistic.
- If two numbers are given, they define the lower and upper bounds in percentages, respectively.
- If one number is given, it defines the upper bound (the lower bound is assumed to be 0).
For example, tc(90) returns the number of data points not including any
data points that fall in the highest 10% of the values. tc(10, 90)
returns the number of data points not including any data points that fall
in the lowest 10% of the values and the highest 90% of the values.
108 109 110 111 112 |
# File 'cloud_watch/stats.rb', line 108 def self.trimmed_count(p1, p2 = nil) Jsii::Type.check_type(p1, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "p1") Jsii::Type.check_type(p2, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "p2") unless p2.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.Stats", "trimmedCount", [p1, p2]) end |
.trimmed_mean(p1, p2 = nil) ⇒ String
Trimmed mean (TM) is the mean of all values that are between two specified boundaries.
Values outside of the boundaries are ignored when the mean is calculated. You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places. The numbers are percentages.
- If two numbers are given, they define the lower and upper bounds in percentages, respectively.
- If one number is given, it defines the upper bound (the lower bound is assumed to be 0).
For example, tm(90) calculates the average after removing the 10% of data
points with the highest values; tm(10, 90) calculates the average after removing the
10% with the lowest and 10% with the highest values.
132 133 134 135 136 |
# File 'cloud_watch/stats.rb', line 132 def self.trimmed_mean(p1, p2 = nil) Jsii::Type.check_type(p1, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "p1") Jsii::Type.check_type(p2, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "p2") unless p2.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.Stats", "trimmedMean", [p1, p2]) end |
.trimmed_sum(p1, p2 = nil) ⇒ String
Trimmed sum (TS) is the sum of the values of data points in a chosen range for a trimmed mean statistic.
It is equivalent to (Trimmed Mean) * (Trimmed count).
- If two numbers are given, they define the lower and upper bounds in percentages, respectively.
- If one number is given, it defines the upper bound (the lower bound is assumed to be 0).
For example, ts(90) returns the sum of the data points not including any
data points that fall in the highest 10% of the values. ts(10, 90)
returns the sum of the data points not including any data points that fall
in the lowest 10% of the values and the highest 90% of the values.
155 156 157 158 159 |
# File 'cloud_watch/stats.rb', line 155 def self.trimmed_sum(p1, p2 = nil) Jsii::Type.check_type(p1, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "p1") Jsii::Type.check_type(p2, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "p2") unless p2.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.Stats", "trimmedSum", [p1, p2]) end |
.ts(p1, p2 = nil) ⇒ String
Shorter alias for trimmedSum().
166 167 168 169 170 |
# File 'cloud_watch/stats.rb', line 166 def self.ts(p1, p2 = nil) Jsii::Type.check_type(p1, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "p1") Jsii::Type.check_type(p2, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "p2") unless p2.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.Stats", "ts", [p1, p2]) end |
.winsorized_mean(p1, p2 = nil) ⇒ String
Winsorized mean (WM) is similar to trimmed mean.
However, with winsorized mean, the values that are outside the boundary are not ignored, but instead are considered to be equal to the value at the edge of the appropriate boundary. After this normalization, the average is calculated. You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places.
- If two numbers are given, they define the lower and upper bounds in percentages, respectively.
- If one number is given, it defines the upper bound (the lower bound is assumed to be 0).
For example, tm(90) calculates the average after removing the 10% of data
points with the highest values; tm(10, 90) calculates the average after removing the
10% with the lowest and 10% with the highest values.
For example, wm(90) calculates the average while treating the 10% of the
highest values to be equal to the value at the 90th percentile.
wm(10, 90) calculates the average while treaing the bottom 10% and the
top 10% of values to be equal to the boundary values.
197 198 199 200 201 |
# File 'cloud_watch/stats.rb', line 197 def self.winsorized_mean(p1, p2 = nil) Jsii::Type.check_type(p1, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "p1") Jsii::Type.check_type(p2, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "p2") unless p2.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.Stats", "winsorizedMean", [p1, p2]) end |
.wm(p1, p2 = nil) ⇒ String
A shorter alias for winsorizedMean().
208 209 210 211 212 |
# File 'cloud_watch/stats.rb', line 208 def self.wm(p1, p2 = nil) Jsii::Type.check_type(p1, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "p1") Jsii::Type.check_type(p2, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "p2") unless p2.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.Stats", "wm", [p1, p2]) end |