mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
Renamed TotalEvalTime to EvalTotalTime
* TotalFoo suggested a comprehensive timing, but TotalEvalTime was part of the Exec timings, together with Queue timings * The other option was to rename ExecTotalTime to TotalExecTime, but there was already ExecQueueTime, suggesting Exec to be some sort of group
This commit is contained in:
parent
af75ce02c1
commit
87c46ea6c3
|
@ -330,7 +330,7 @@ func (ng *Engine) exec(ctx context.Context, q *query) (Value, error) {
|
|||
|
||||
const env = "query execution"
|
||||
|
||||
evalTimer := q.stats.GetTimer(stats.TotalEvalTime).Start()
|
||||
evalTimer := q.stats.GetTimer(stats.EvalTotalTime).Start()
|
||||
defer evalTimer.Stop()
|
||||
|
||||
// The base context might already be canceled on the first iteration (e.g. during shutdown).
|
||||
|
|
|
@ -19,7 +19,7 @@ type QueryTiming int
|
|||
|
||||
// Query timings.
|
||||
const (
|
||||
TotalEvalTime QueryTiming = iota
|
||||
EvalTotalTime QueryTiming = iota
|
||||
ResultSortTime
|
||||
QueryPreparationTime
|
||||
InnerEvalTime
|
||||
|
@ -31,8 +31,8 @@ const (
|
|||
// Return a string representation of a QueryTiming identifier.
|
||||
func (s QueryTiming) String() string {
|
||||
switch s {
|
||||
case TotalEvalTime:
|
||||
return "Total eval time"
|
||||
case EvalTotalTime:
|
||||
return "Eval total time"
|
||||
case ResultSortTime:
|
||||
return "Result sorting time"
|
||||
case QueryPreparationTime:
|
||||
|
@ -52,7 +52,7 @@ func (s QueryTiming) String() string {
|
|||
|
||||
// QueryStats with all query timers mapped to durations.
|
||||
type QueryStats struct {
|
||||
TotalEvalTime float64 `json:"totalEvalTime"`
|
||||
EvalTotalTime float64 `json:"evalTotalTime"`
|
||||
ResultSortTime float64 `json:"resultSortTime"`
|
||||
QueryPreparationTime float64 `json:"queryPreparationTime"`
|
||||
InnerEvalTime float64 `json:"innerEvalTime"`
|
||||
|
@ -68,8 +68,8 @@ func NewQueryStats(tg *TimerGroup) *QueryStats {
|
|||
|
||||
for s, timer := range tg.timers {
|
||||
switch s {
|
||||
case TotalEvalTime:
|
||||
qs.TotalEvalTime = timer.Duration()
|
||||
case EvalTotalTime:
|
||||
qs.EvalTotalTime = timer.Duration()
|
||||
case ResultSortTime:
|
||||
qs.ResultSortTime = timer.Duration()
|
||||
case QueryPreparationTime:
|
||||
|
|
Loading…
Reference in a new issue