From c87c7d1e29d382ef357e79dcd90256259f7c9cd8 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 23 Feb 2023 20:05:11 -0800 Subject: [PATCH] app/vmselect/promql: measure the time required for calculating the aggregate function from the prepared source time series --- app/vmselect/promql/eval.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/vmselect/promql/eval.go b/app/vmselect/promql/eval.go index 100bb15d5..ded6e9577 100644 --- a/app/vmselect/promql/eval.go +++ b/app/vmselect/promql/eval.go @@ -373,7 +373,9 @@ func evalAggrFunc(qt *querytracer.Tracer, ec *EvalConfig, ae *metricsql.AggrFunc args: args, ec: ec, } + qtChild := qt.NewChild("eval %s", ae.Name) rv, err := af(afa) + qtChild.Done() if err != nil { return nil, fmt.Errorf(`cannot evaluate %q: %w`, ae.AppendString(nil), err) }