mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-11 15:34:56 +00:00
app/vmselect/promql: simplify defer call for querystats.RegisterQuery
This commit is contained in:
parent
ad4e6a9283
commit
df0309eae0
1 changed files with 1 additions and 3 deletions
|
@ -42,9 +42,7 @@ func Exec(ec *EvalConfig, q string, isFirstPointOnly bool) ([]netstorage.Result,
|
|||
}
|
||||
if querystats.Enabled() {
|
||||
startTime := time.Now()
|
||||
defer func() {
|
||||
querystats.RegisterQuery(q, ec.End-ec.Start, startTime)
|
||||
}()
|
||||
defer querystats.RegisterQuery(q, ec.End-ec.Start, startTime)
|
||||
}
|
||||
|
||||
ec.validate()
|
||||
|
|
Loading…
Reference in a new issue