import { i18n } from '@kbn/i18n' ; import { LatencyAggregationType } from '../../../../common/latency_aggregation_types' ; export function getLatencyColumnLabel ( latencyAggregationType ? ) { switch ( latencyAggregationType ) { case LatencyAggregationType . avg : return i18n . translate ( 'xpack.apm.serviceOverview.latencyColumnAvgLabel' , { defaultMessage : 'Latency (avg.)' , } ) ; case LatencyAggregationType . p95 : return i18n . translate ( 'xpack.apm.serviceOverview.latencyColumnP95Label' , { defaultMessage : 'Latency (95th)' , } ) ; case LatencyAggregationType . p99 : return i18n . translate ( 'xpack.apm.serviceOverview.latencyColumnP99Label' , { defaultMessage : 'Latency (99th)' , } ) ; default : return i18n . translate ( 'xpack.apm.serviceOverview.latencyColumnDefaultLabel' , { defaultMessage : 'Latency' , } ) ; } }