"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CloudfrontLatencyMetric = void 0;
const aws_cdk_lib_1 = require("aws-cdk-lib");
const _1 = require(".");
class CloudfrontLatencyMetric extends aws_cdk_lib_1.aws_cloudwatch.Metric {
    constructor(props, percentile) {
        var _a;
        super((0, _1.cloudfrontMetricPropsToMetricProps)(props, 'OriginLatency', (_a = props.label) !== null && _a !== void 0 ? _a : 'Cache Miss Latency', `p${percentile}`));
    }
}
exports.CloudfrontLatencyMetric = CloudfrontLatencyMetric;
