app/vmselect/promql: move the eval function args in parallel query trace outside the loop

This commit is contained in:
Aliaksandr Valialkin 2023-01-10 22:23:27 -08:00
parent a0f9cb27f9
commit 31fc29599f
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -652,9 +652,9 @@ func evalExprsInParallel(qt *querytracer.Tracer, ec *EvalConfig, es []metricsql.
} }
rvs := make([][]*timeseries, len(es)) rvs := make([][]*timeseries, len(es))
errs := make([]error, len(es)) errs := make([]error, len(es))
qt.Printf("eval function args in parallel")
var wg sync.WaitGroup var wg sync.WaitGroup
for i, e := range es { for i, e := range es {
qt.Printf("eval function args in parallel")
wg.Add(1) wg.Add(1)
qtChild := qt.NewChild("eval arg %d", i) qtChild := qt.NewChild("eval arg %d", i)
go func(e metricsql.Expr, i int) { go func(e metricsql.Expr, i int) {