Class: AWSCDK::CloudWatch::Stats

Inherits:
Jsii::Object
  • Object
show all
Defined in:
cloud_watch/stats.rb

Overview

Factory functions for standard statistics strings.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStats

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

.AVERAGEString

The value of Sum / SampleCount during the specified period.

Returns:

  • (String)


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

.IQMString

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).

Returns:

  • (String)


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_methodsObject



12
13
14
15
# File 'cloud_watch/stats.rb', line 12

def self.jsii_overridable_methods
  {
  }
end

.MAXIMUMString

The highest value observed during the specified period.

You can use this value to determine high volumes of activity for your application.

Returns:

  • (String)


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

.MINIMUMString

The lowest value observed during the specified period.

You can use this value to determine low volumes of activity for your application.

Returns:

  • (String)


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().

Parameters:

  • percentile (Numeric)

Returns:

  • (String)


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.

Parameters:

  • percentile (Numeric)

Returns:

  • (String)


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.

Parameters:

  • v1 (Numeric)
  • v2 (Numeric, nil) (defaults to: nil)

Returns:

  • (String)


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().

Parameters:

  • v1 (Numeric)
  • v2 (Numeric, nil) (defaults to: nil)

Returns:

  • (String)


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_COUNTString

The count (number) of data points used for the statistical calculation.

Returns:

  • (String)


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

.SUMString

All values submitted for the matching metric added together.

This statistic can be useful for determining the total volume of a metric.

Returns:

  • (String)


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().

Parameters:

  • p1 (Numeric)
  • p2 (Numeric, nil) (defaults to: nil)

Returns:

  • (String)


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().

Parameters:

  • p1 (Numeric)
  • p2 (Numeric, nil) (defaults to: nil)

Returns:

  • (String)


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.

Parameters:

  • p1 (Numeric)
  • p2 (Numeric, nil) (defaults to: nil)

Returns:

  • (String)


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.

Parameters:

  • p1 (Numeric)
  • p2 (Numeric, nil) (defaults to: nil)

Returns:

  • (String)


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.

Parameters:

  • p1 (Numeric)
  • p2 (Numeric, nil) (defaults to: nil)

Returns:

  • (String)


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().

Parameters:

  • p1 (Numeric)
  • p2 (Numeric, nil) (defaults to: nil)

Returns:

  • (String)


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.

Parameters:

  • p1 (Numeric)
  • p2 (Numeric, nil) (defaults to: nil)

Returns:

  • (String)


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().

Parameters:

  • p1 (Numeric)
  • p2 (Numeric, nil) (defaults to: nil)

Returns:

  • (String)


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