mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Cloud monitoring: Add REDUCE_MEAN reducer for cumulative metrics (#28192)
* Cloud monitoring: Add REDUCE_MEAN reducer for cumulative metrics * Fix tests
This commit is contained in:
parent
21ed77d7a5
commit
83a6a5144d
@ -62,7 +62,7 @@ describe('Aggregations', () => {
|
|||||||
const { options } = wrapper.find(Segment).props() as any;
|
const { options } = wrapper.find(Segment).props() as any;
|
||||||
const [, aggGroup] = options;
|
const [, aggGroup] = options;
|
||||||
|
|
||||||
expect(aggGroup.options.length).toEqual(10);
|
expect(aggGroup.options.length).toEqual(11);
|
||||||
expect(aggGroup.options.map((o: any) => o.value)).toEqual(expect.arrayContaining(['REDUCE_NONE']));
|
expect(aggGroup.options.map((o: any) => o.value)).toEqual(expect.arrayContaining(['REDUCE_NONE']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -152,7 +152,7 @@ export const aggOptions = [
|
|||||||
text: 'mean',
|
text: 'mean',
|
||||||
value: 'REDUCE_MEAN',
|
value: 'REDUCE_MEAN',
|
||||||
valueTypes: [ValueTypes.INT64, ValueTypes.DOUBLE, ValueTypes.MONEY, ValueTypes.DISTRIBUTION],
|
valueTypes: [ValueTypes.INT64, ValueTypes.DOUBLE, ValueTypes.MONEY, ValueTypes.DISTRIBUTION],
|
||||||
metricKinds: [MetricKind.GAUGE, MetricKind.DELTA],
|
metricKinds: [MetricKind.GAUGE, MetricKind.DELTA, MetricKind.CUMULATIVE],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'min',
|
text: 'min',
|
||||||
|
Loading…
Reference in New Issue
Block a user