Skip to content
v2.274.0

Statistic Enum ​

Statistic to use over the aggregation period.

Example ​

ts
declare const matchmakingRuleSet: gamelift.MatchmakingRuleSet;
// Alarm that triggers when the per-second average of not placed matches exceed 10%
const ruleEvaluationRatio = new cloudwatch.MathExpression({
  expression: '1 - (ruleEvaluationsPassed / ruleEvaluationsFailed)',
  usingMetrics: {
    ruleEvaluationsPassed: matchmakingRuleSet.metricRuleEvaluationsPassed({ statistic: cloudwatch.Statistic.SUM }),
    ruleEvaluationsFailed: matchmakingRuleSet.metric('ruleEvaluationsFailed'),
  },
});
new cloudwatch.Alarm(this, 'Alarm', {
  metric: ruleEvaluationRatio,
  threshold: 0.1,
  evaluationPeriods: 3,
});

Members ​

MemberDescription
SAMPLE_COUNTThe count (number) of data points used for the statistical calculation.
AVERAGEThe value of Sum / SampleCount during the specified period.
SUMAll values submitted for the matching metric added together.
MINIMUMThe lowest value observed during the specified period.
MAXIMUMThe highest value observed during the specified period.