From 8efa9159cf1fe877a1a964563952777f88908010 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 98b53089c0..9daf4cdb3b 100644 --- a/app/vmselect/promql/eval.go +++ b/app/vmselect/promql/eval.go @@ -390,7 +390,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) }