app/vmselect/promql: consistency renaming: candlestick -> rollup_candlestick

This commit is contained in:
Aliaksandr Valialkin 2019-06-29 03:13:02 +03:00
parent 828078eb45
commit 74c0fb04f3
3 changed files with 4 additions and 4 deletions

View File

@ -619,7 +619,7 @@ func getRollupConfigs(name string, rf rollupFunc, start, end, step, window int64
deltaValues(values)
}
rcs = appendRollupConfigs(rcs)
case "candlestick":
case "rollup_candlestick":
rcs = append(rcs, newRollupConfig(rollupFirst, "open"))
rcs = append(rcs, newRollupConfig(rollupLast, "close"))
rcs = append(rcs, newRollupConfig(rollupMin, "low"))

View File

@ -3203,9 +3203,9 @@ func TestExecSuccess(t *testing.T) {
resultExpected := []netstorage.Result{r}
f(q, resultExpected)
})
t.Run(`candlestick()`, func(t *testing.T) {
t.Run(`rollup_candlestick()`, func(t *testing.T) {
t.Parallel()
q := `sort(candlestick(round(rand(0),0.01)[:10s]))`
q := `sort(rollup_candlestick(round(rand(0),0.01)[:10s]))`
r1 := netstorage.Result{
MetricName: metricNameExpected,
Values: []float64{0.02, 0.02, 0.03, 0, 0.03, 0.02},

View File

@ -50,7 +50,7 @@ var rollupFuncs = map[string]newRollupFunc{
"rollup_deriv": newRollupFuncOneArg(rollupFake),
"rollup_delta": newRollupFuncOneArg(rollupFake),
"rollup_increase": newRollupFuncOneArg(rollupFake), // + rollupFuncsRemoveCounterResets
"candlestick": newRollupFuncOneArg(rollupFake),
"rollup_candlestick": newRollupFuncOneArg(rollupFake),
}
var rollupFuncsMayAdjustWindow = map[string]bool{