mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 21:54:10 -08:00
Merge pull request #11723 from alanprot/span-fix
Finishing evalSpanTimer always before return
This commit is contained in:
commit
c3fac587ef
|
@ -653,12 +653,13 @@ func (ng *Engine) execEvalStmt(ctx context.Context, query *query, s *parser.Eval
|
||||||
query.sampleStats.InitStepTracking(start, start, 1)
|
query.sampleStats.InitStepTracking(start, start, 1)
|
||||||
|
|
||||||
val, warnings, err := evaluator.Eval(s.Expr)
|
val, warnings, err := evaluator.Eval(s.Expr)
|
||||||
|
|
||||||
|
evalSpanTimer.Finish()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, warnings, err
|
return nil, warnings, err
|
||||||
}
|
}
|
||||||
|
|
||||||
evalSpanTimer.Finish()
|
|
||||||
|
|
||||||
var mat Matrix
|
var mat Matrix
|
||||||
|
|
||||||
switch result := val.(type) {
|
switch result := val.(type) {
|
||||||
|
@ -704,10 +705,12 @@ func (ng *Engine) execEvalStmt(ctx context.Context, query *query, s *parser.Eval
|
||||||
}
|
}
|
||||||
query.sampleStats.InitStepTracking(evaluator.startTimestamp, evaluator.endTimestamp, evaluator.interval)
|
query.sampleStats.InitStepTracking(evaluator.startTimestamp, evaluator.endTimestamp, evaluator.interval)
|
||||||
val, warnings, err := evaluator.Eval(s.Expr)
|
val, warnings, err := evaluator.Eval(s.Expr)
|
||||||
|
|
||||||
|
evalSpanTimer.Finish()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, warnings, err
|
return nil, warnings, err
|
||||||
}
|
}
|
||||||
evalSpanTimer.Finish()
|
|
||||||
|
|
||||||
mat, ok := val.(Matrix)
|
mat, ok := val.(Matrix)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
|
Loading…
Reference in a new issue