import { euiLightVars as theme } from '@kbn/ui-shared-deps-src/theme' ; import { i18n } from '@kbn/i18n' ; import { METRIC_JAVA_GC_COUNT } from '../../../../../../common/elasticsearch_fieldnames' ; import { Setup } from '../../../../../lib/helpers/setup_request' ; import { fetchAndTransformGcMetrics } from './fetch_and_transform_gc_metrics' ; import { ChartBase } from '../../../types' ; const series = { [ METRIC_JAVA_GC_COUNT ] : { title : i18n . translate ( 'xpack.apm.agentMetrics.java.gcRate' , { defaultMessage : 'GC rate' , } ) , color : theme . euiColorVis0 , } , } ; const chartBase = { title : i18n . translate ( 'xpack.apm.agentMetrics.java.gcRateChartTitle' , { defaultMessage : 'Garbage collection per minute' , } ) , key : 'gc_rate_line_chart' , type : 'linemark' , yUnit : 'integer' , series , } ; function getGcRateChart ( { environment , kuery , setup , serviceName , serviceNodeName , start , end , } ) { return fetchAndTransformGcMetrics ( { environment , kuery , setup , serviceName , serviceNodeName , start , end , chartBase , fieldName : METRIC_JAVA_GC_COUNT , operationName : 'get_gc_rate_charts' , } ) ; } export { getGcRateChart } ;