functions: rename moving avg to graphite-like
This commit is contained in:
@@ -104,9 +104,10 @@ let metricFunctions = {
|
||||
scale: scale,
|
||||
delta: delta,
|
||||
rate: rate,
|
||||
simpleMovingAverage: simpleMovingAverage,
|
||||
expMovingAverage: expMovingAverage,
|
||||
movingAverage: simpleMovingAverage,
|
||||
exponentialMovingAverage: expMovingAverage,
|
||||
aggregateBy: aggregateByWrapper,
|
||||
// Predefined aggs
|
||||
average: _.partial(aggregateWrapper, AVERAGE),
|
||||
min: _.partial(aggregateWrapper, MIN),
|
||||
max: _.partial(aggregateWrapper, MAX),
|
||||
|
||||
@@ -58,19 +58,19 @@ addFuncDef({
|
||||
});
|
||||
|
||||
addFuncDef({
|
||||
name: 'simpleMovingAverage',
|
||||
name: 'movingAverage',
|
||||
category: 'Transform',
|
||||
params: [
|
||||
{ name: 'factor', type: 'int', options: [6, 10, 60, 600] }
|
||||
{ name: 'factor', type: 'int', options: [6, 10, 60, 100, 600] }
|
||||
],
|
||||
defaultParams: [10],
|
||||
});
|
||||
|
||||
addFuncDef({
|
||||
name: 'expMovingAverage',
|
||||
name: 'exponentialMovingAverage',
|
||||
category: 'Transform',
|
||||
params: [
|
||||
{ name: 'smoothing', type: 'float', options: [0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.5, 0.7, 0.9] }
|
||||
{ name: 'smoothing', type: 'float', options: [6, 10, 60, 100, 600] }
|
||||
],
|
||||
defaultParams: [0.2],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user