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:
Sofia Papagiannaki 2020-10-12 15:28:18 +03:00 committed by GitHub
parent 21ed77d7a5
commit 83a6a5144d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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']));
}); });
}); });

View File

@ -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',