mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmselect/promql: simplify defer call for querystats.RegisterQuery
This commit is contained in:
parent
44932098b5
commit
0e739efc88
1 changed files with 1 additions and 3 deletions
|
@ -43,9 +43,7 @@ func Exec(ec *EvalConfig, q string, isFirstPointOnly bool) ([]netstorage.Result,
|
||||||
if querystats.Enabled() {
|
if querystats.Enabled() {
|
||||||
startTime := time.Now()
|
startTime := time.Now()
|
||||||
ac := ec.AuthToken
|
ac := ec.AuthToken
|
||||||
defer func() {
|
defer querystats.RegisterQuery(ac.AccountID, ac.ProjectID, q, ec.End-ec.Start, startTime)
|
||||||
querystats.RegisterQuery(ac.AccountID, ac.ProjectID, q, ec.End-ec.Start, startTime)
|
|
||||||
}()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ec.validate()
|
ec.validate()
|
||||||
|
|
Loading…
Reference in a new issue