// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`multiply/divide metric produces expected result 1`] = ` MathExpression { "color": undefined, "expression": "m1 * 42", "label": "DummyLabel", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "searchAccount": undefined, "searchRegion": undefined, "usingMetrics": Object { "m1": Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": undefined, "metricName": "DummyMetric", "namespace": "DummyNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "Average", "unit": undefined, "warnings": undefined, }, }, } `; exports[`multiply/divide metric produces expected result 2`] = ` MathExpression { "color": undefined, "expression": "m1 / 5", "label": "DummyLabel", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "searchAccount": undefined, "searchRegion": undefined, "usingMetrics": Object { "m1": Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": undefined, "metricName": "DummyMetric", "namespace": "DummyNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "Average", "unit": undefined, "warnings": undefined, }, }, } `; exports[`snapshot test: createMetric 1`] = ` Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": undefined, "metricName": "DummyMetricName-NoOptionalParams", "namespace": "DummyNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "p90", "unit": undefined, "warnings": undefined, } `; exports[`snapshot test: createMetric 2`] = ` Metric { "account": undefined, "color": "#abcdef", "dimensions": Object { "DummyDimension": "DummyDimensionValue", }, "label": "DummyLabel", "metricName": "DummyMetricName-AllOptionalParams", "namespace": "DummyNamespaceOverride", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "p90", "unit": undefined, "warnings": undefined, } `; exports[`snapshot test: createMetric 3`] = ` Metric { "account": "123456789", "color": "#abcdef", "dimensions": Object {}, "label": "DummyLabel", "metricName": "DummyMetricName-AllOptionalParams", "namespace": "DummyNamespaceOverride", "period": Duration { "amount": 15, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": "us-west-2", "statistic": "p90", "unit": undefined, "warnings": undefined, } `; exports[`snapshot test: createMetricAnomalyDetection 1`] = ` AnomalyDetectionMathExpression { "color": undefined, "expression": "ANOMALY_DETECTION_BAND(m1,2)", "label": "DummyLabel", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "searchAccount": undefined, "searchRegion": undefined, "usingMetrics": Object { "m1": Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": undefined, "metricName": "DummyMetric", "namespace": "DummyNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "Average", "unit": undefined, "warnings": undefined, }, }, } `; exports[`snapshot test: createMetricMath 1`] = ` MathExpression { "color": undefined, "expression": "a+b", "label": "a and b", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "searchAccount": undefined, "searchRegion": undefined, "usingMetrics": Object { "a": Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": undefined, "metricName": "a", "namespace": "DummyNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "Sum", "unit": undefined, "warnings": undefined, }, "b": Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": undefined, "metricName": "b", "namespace": "DummyNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "Sum", "unit": undefined, "warnings": undefined, }, }, } `; exports[`snapshot test: createMetricMath 2`] = ` MathExpression { "color": "#abcdef", "expression": "a+b", "label": "a and b", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "searchAccount": undefined, "searchRegion": undefined, "usingMetrics": Object { "a": Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": undefined, "metricName": "a", "namespace": "DummyNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "Sum", "unit": undefined, "warnings": undefined, }, "b": Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": undefined, "metricName": "b", "namespace": "DummyNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "Sum", "unit": undefined, "warnings": undefined, }, }, } `; exports[`snapshot test: createMetricSearch 1`] = ` MathExpression { "color": undefined, "expression": "SEARCH('{DummyNamespace,DummyDimension} DummyDimension=\\"DummyDimensionValue\\" MyMetricPrefix-', 'Sum', 300)", "label": " ", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "searchAccount": undefined, "searchRegion": undefined, "usingMetrics": Object {}, "warnings": Array [ "Math expression 'SEARCH('{DummyNamespace,DummyDimension} DummyDimension=\\"DummyDimensionValue\\" MyMetricPrefix-', 'Sum', 300)' references unknown identifiers: ummyNamespace, ummyDimension, ummyDimension, ummyDimensionValue, yMetricPrefix, um. Please add them to the 'usingMetrics' map.", ], } `; exports[`snapshot test: createMetricSearch 2`] = ` MathExpression { "color": undefined, "expression": "SEARCH('{DummyNamespaceOverride,DummyDimension} DummyDimension=\\"DummyDimensionValue\\" MyMetricPrefix-', 'Sum', 300)", "label": " ", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "searchAccount": undefined, "searchRegion": undefined, "usingMetrics": Object {}, "warnings": Array [ "Math expression 'SEARCH('{DummyNamespaceOverride,DummyDimension} DummyDimension=\\"DummyDimensionValue\\" MyMetricPrefix-', 'Sum', 300)' references unknown identifiers: ummyNamespaceOverride, ummyDimension, ummyDimension, ummyDimensionValue, yMetricPrefix, um. Please add them to the 'usingMetrics' map.", ], } `; exports[`snapshot test: createMetricSearch 3`] = ` MathExpression { "color": undefined, "expression": "SEARCH('{DummyNamespaceOverride,DummyUndefinedDimension,DummyDefinedDimension} DummyDefinedDimension=\\"DummyDimensionValue\\" MyMetricPrefix-', 'Sum', 300)", "label": " ", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "searchAccount": undefined, "searchRegion": undefined, "usingMetrics": Object {}, "warnings": Array [ "Math expression 'SEARCH('{DummyNamespaceOverride,DummyUndefinedDimension,DummyDefinedDimension} DummyDefinedDimension=\\"DummyDimensionValue\\" MyMetricPrefix-', 'Sum', 300)' references unknown identifiers: ummyNamespaceOverride, ummyUndefinedDimension, ummyDefinedDimension, ummyDefinedDimension, ummyDimensionValue, yMetricPrefix, um. Please add them to the 'usingMetrics' map.", ], } `; exports[`snapshot test: createMetricSearch 4`] = ` MathExpression { "color": undefined, "expression": "SEARCH('{DummyNamespaceOverride} MyMetricPrefix-', 'Sum', 300)", "label": " ", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "searchAccount": undefined, "searchRegion": undefined, "usingMetrics": Object {}, "warnings": Array [ "Math expression 'SEARCH('{DummyNamespaceOverride} MyMetricPrefix-', 'Sum', 300)' references unknown identifiers: ummyNamespaceOverride, yMetricPrefix, um. Please add them to the 'usingMetrics' map.", ], } `; exports[`snapshot test: global defaults 1`] = ` Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": undefined, "metricName": "DummyMetricName", "namespace": "SomeNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "p90", "unit": undefined, "warnings": undefined, } `; exports[`snapshot test: global defaults 2`] = ` Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": undefined, "metricName": "DummyMetricName", "namespace": "DummyNamespace", "period": Duration { "amount": 15, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "p90", "unit": undefined, "warnings": undefined, } `; exports[`snapshot test: global defaults 3`] = ` Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": undefined, "metricName": "DummyMetricName", "namespace": "DummyNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": "us-west-2", "statistic": "p90", "unit": undefined, "warnings": undefined, } `; exports[`snapshot test: global defaults 4`] = ` Metric { "account": "123456789", "color": undefined, "dimensions": undefined, "label": undefined, "metricName": "DummyMetricName", "namespace": "DummyNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "p90", "unit": undefined, "warnings": undefined, } `; exports[`snapshot test: global defaults 5`] = ` Metric { "account": "123456789", "color": undefined, "dimensions": undefined, "label": undefined, "metricName": "DummyMetricName", "namespace": "SomeNamespace", "period": Duration { "amount": 15, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": "us-west-2", "statistic": "p90", "unit": undefined, "warnings": undefined, } `; exports[`snapshot test: toRate with detail 1`] = ` Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": "Label (avg) (min: \${MIN}, max: \${MAX})", "metricName": "Metric", "namespace": "DummyNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "Average", "unit": undefined, "warnings": undefined, } `; exports[`snapshot test: toRate with detail 2`] = ` MathExpression { "color": undefined, "expression": "m1 / PERIOD(m1)", "label": "Label/s (min: \${MIN}, max: \${MAX}, avg: \${AVG})", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "searchAccount": undefined, "searchRegion": undefined, "usingMetrics": Object { "m1": Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": "Label", "metricName": "Metric", "namespace": "DummyNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "Sum", "unit": undefined, "warnings": undefined, }, }, } `; exports[`snapshot test: toRate with detail 3`] = ` MathExpression { "color": undefined, "expression": "(60 * m1) / PERIOD(m1)", "label": "Label/m (min: \${MIN}, max: \${MAX}, avg: \${AVG})", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "searchAccount": undefined, "searchRegion": undefined, "usingMetrics": Object { "m1": Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": "Label", "metricName": "Metric", "namespace": "DummyNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "Sum", "unit": undefined, "warnings": undefined, }, }, } `; exports[`snapshot test: toRate with detail 4`] = ` MathExpression { "color": undefined, "expression": "(3600 * m1) / PERIOD(m1)", "label": "Label/h (min: \${MIN}, max: \${MAX}, avg: \${AVG})", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "searchAccount": undefined, "searchRegion": undefined, "usingMetrics": Object { "m1": Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": "Label", "metricName": "Metric", "namespace": "DummyNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "Sum", "unit": undefined, "warnings": undefined, }, }, } `; exports[`snapshot test: toRate with detail 5`] = ` MathExpression { "color": undefined, "expression": "(86400 * m1) / PERIOD(m1)", "label": "Label/d (min: \${MIN}, max: \${MAX}, avg: \${AVG})", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "searchAccount": undefined, "searchRegion": undefined, "usingMetrics": Object { "m1": Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": "Label", "metricName": "Metric", "namespace": "DummyNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "Sum", "unit": undefined, "warnings": undefined, }, }, } `; exports[`snapshot test: toRate without detail 1`] = ` Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": "Label (avg)", "metricName": "Metric", "namespace": "DummyNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "Average", "unit": undefined, "warnings": undefined, } `; exports[`snapshot test: toRate without detail 2`] = ` MathExpression { "color": undefined, "expression": "m1 / PERIOD(m1)", "label": "Label/s", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "searchAccount": undefined, "searchRegion": undefined, "usingMetrics": Object { "m1": Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": "Label", "metricName": "Metric", "namespace": "DummyNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "Sum", "unit": undefined, "warnings": undefined, }, }, } `; exports[`snapshot test: toRate without detail 3`] = ` MathExpression { "color": undefined, "expression": "(60 * m1) / PERIOD(m1)", "label": "Label/m", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "searchAccount": undefined, "searchRegion": undefined, "usingMetrics": Object { "m1": Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": "Label", "metricName": "Metric", "namespace": "DummyNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "Sum", "unit": undefined, "warnings": undefined, }, }, } `; exports[`snapshot test: toRate without detail 4`] = ` MathExpression { "color": undefined, "expression": "(3600 * m1) / PERIOD(m1)", "label": "Label/h", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "searchAccount": undefined, "searchRegion": undefined, "usingMetrics": Object { "m1": Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": "Label", "metricName": "Metric", "namespace": "DummyNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "Sum", "unit": undefined, "warnings": undefined, }, }, } `; exports[`snapshot test: toRate without detail 5`] = ` MathExpression { "color": undefined, "expression": "(86400 * m1) / PERIOD(m1)", "label": "Label/d", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "searchAccount": undefined, "searchRegion": undefined, "usingMetrics": Object { "m1": Metric { "account": undefined, "color": undefined, "dimensions": undefined, "label": "Label", "metricName": "Metric", "namespace": "DummyNamespace", "period": Duration { "amount": 5, "unit": TimeUnit { "inMillis": 60000, "isoLabel": "M", "label": "minutes", }, }, "region": undefined, "statistic": "Sum", "unit": undefined, "warnings": undefined, }, }, } `;