Class Stats
Factory functions for standard statistics strings.
Inheritance
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class Stats : DeputyBase
Syntax (vb)
Public MustInherit Class Stats
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
Dashboard dashboard;
Metric executionCountMetric;
Metric errorCountMetric;
dashboard.AddWidgets(new GraphWidget(new GraphWidgetProps {
Title = "Executions vs error rate",
Left = new [] { executionCountMetric },
Right = new [] { errorCountMetric.With(new MetricOptions {
Statistic = Stats.AVERAGE,
Label = "Error rate",
Color = Color.GREEN
}) }
}));
Synopsis
Constructors
Stats() | |
Stats(By |
Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Stats(Deputy |
Used by jsii to construct an instance of this class from DeputyProps |
Properties
AVERAGE | The value of Sum / SampleCount during the specified period. |
IQM | Interquartile mean (IQM) is the trimmed mean of the interquartile range, or the middle 50% of values. |
MAXIMUM | The highest value observed during the specified period. |
MINIMUM | The lowest value observed during the specified period. |
SAMPLE_COUNT | The count (number) of data points used for the statistical calculation. |
SUM | All values submitted for the matching metric added together. |
Methods
P(Double) | A shorter alias for |
Percentile(Double) | Percentile indicates the relative standing of a value in a dataset. |
PercentileRank(Double, Nullable<Double>) | Percentile rank (PR) is the percentage of values that meet a fixed threshold. |
Pr(Double, Nullable<Double>) | Shorter alias for |
Tc(Double, Nullable<Double>) | Shorter alias for |
Tm(Double, Nullable<Double>) | A shorter alias for |
TrimmedCount(Double, Nullable<Double>) | Trimmed count (TC) is the number of data points in the chosen range for a trimmed mean statistic. |
TrimmedMean(Double, Nullable<Double>) | Trimmed mean (TM) is the mean of all values that are between two specified boundaries. |
TrimmedSum(Double, Nullable<Double>) | Trimmed sum (TS) is the sum of the values of data points in a chosen range for a trimmed mean statistic. |
Ts(Double, Nullable<Double>) | Shorter alias for |
WinsorizedMean(Double, Nullable<Double>) | Winsorized mean (WM) is similar to trimmed mean. |
Wm(Double, Nullable<Double>) | A shorter alias for |
Constructors
Stats()
protected Stats()
Stats(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Stats(ByRefValue reference)
Parameters
- reference Amazon.
JSII. Runtime. Deputy. By Ref Value The Javascript-owned object reference
Stats(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Stats(DeputyBase.DeputyProps props)
Parameters
- props Amazon.
JSII. Runtime. Deputy. Deputy Base. Deputy Props The deputy props
Properties
AVERAGE
The value of Sum / SampleCount during the specified period.
public static string AVERAGE { get; }
Property Value
System.
IQM
Interquartile mean (IQM) is the trimmed mean of the interquartile range, or the middle 50% of values.
public static string IQM { get; }
Property Value
System.
Remarks
It is equivalent to trimmedMean(25, 75)
.
MAXIMUM
The highest value observed during the specified period.
public static string MAXIMUM { get; }
Property Value
System.
Remarks
You can use this value to determine high volumes of activity for your application.
MINIMUM
The lowest value observed during the specified period.
public static string MINIMUM { get; }
Property Value
System.
Remarks
You can use this value to determine low volumes of activity for your application.
SAMPLE_COUNT
The count (number) of data points used for the statistical calculation.
public static string SAMPLE_COUNT { get; }
Property Value
System.
SUM
All values submitted for the matching metric added together.
public static string SUM { get; }
Property Value
System.
Remarks
This statistic can be useful for determining the total volume of a metric.
Methods
P(Double)
A shorter alias for percentile()
.
public static string P(double percentile)
Parameters
- percentile System.
Double
Returns
System.
Percentile(Double)
Percentile indicates the relative standing of a value in a dataset.
public static string Percentile(double percentile)
Parameters
- percentile System.
Double
Returns
System.
Remarks
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.
PercentileRank(Double, Nullable<Double>)
Percentile rank (PR) is the percentage of values that meet a fixed threshold.
public static string PercentileRank(double v1, Nullable<double> v2 = null)
Parameters
- v1 System.
Double - v2 System.
Nullable <System.Double >
Returns
System.
Remarks
For example, percentileRank(300)
returns the percentage of data points that have a value of 300 or less.
percentileRank(100, 2000)
returns the percentage of data points that have a value between 100 and 2000.
Pr(Double, Nullable<Double>)
Shorter alias for percentileRank()
.
public static string Pr(double v1, Nullable<double> v2 = null)
Parameters
- v1 System.
Double - v2 System.
Nullable <System.Double >
Returns
System.
Tc(Double, Nullable<Double>)
Shorter alias for trimmedCount()
.
public static string Tc(double p1, Nullable<double> p2 = null)
Parameters
- p1 System.
Double - p2 System.
Nullable <System.Double >
Returns
System.
Tm(Double, Nullable<Double>)
A shorter alias for trimmedMean()
.
public static string Tm(double p1, Nullable<double> p2 = null)
Parameters
- p1 System.
Double - p2 System.
Nullable <System.Double >
Returns
System.
TrimmedCount(Double, Nullable<Double>)
Trimmed count (TC) is the number of data points in the chosen range for a trimmed mean statistic.
public static string TrimmedCount(double p1, Nullable<double> p2 = null)
Parameters
- p1 System.
Double - p2 System.
Nullable <System.Double >
Returns
System.
Remarks
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.
TrimmedMean(Double, Nullable<Double>)
Trimmed mean (TM) is the mean of all values that are between two specified boundaries.
public static string TrimmedMean(double p1, Nullable<double> p2 = null)
Parameters
- p1 System.
Double - p2 System.
Nullable <System.Double >
Returns
System.
Remarks
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.
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.
TrimmedSum(Double, Nullable<Double>)
Trimmed sum (TS) is the sum of the values of data points in a chosen range for a trimmed mean statistic.
public static string TrimmedSum(double p1, Nullable<double> p2 = null)
Parameters
- p1 System.
Double - p2 System.
Nullable <System.Double >
Returns
System.
Remarks
It is equivalent to (Trimmed Mean) * (Trimmed count)
.
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.
Ts(Double, Nullable<Double>)
Shorter alias for trimmedSum()
.
public static string Ts(double p1, Nullable<double> p2 = null)
Parameters
- p1 System.
Double - p2 System.
Nullable <System.Double >
Returns
System.
WinsorizedMean(Double, Nullable<Double>)
Winsorized mean (WM) is similar to trimmed mean.
public static string WinsorizedMean(double p1, Nullable<double> p2 = null)
Parameters
- p1 System.
Double - p2 System.
Nullable <System.Double >
Returns
System.
Remarks
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.
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.
Wm(Double, Nullable<Double>)
A shorter alias for winsorizedMean()
.
public static string Wm(double p1, Nullable<double> p2 = null)
Parameters
- p1 System.
Double - p2 System.
Nullable <System.Double >
Returns
System.