mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 00:13:30 +01:00
app/vmselect/promql: simplify defer call for querystats.RegisterQuery
This commit is contained in:
parent
44932098b5
commit
0e739efc88
@ -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 New Issue
Block a user