mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -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"
|
const env = "query execution"
|
||||||
|
|
||||||
evalTimer := q.stats.GetTimer(stats.TotalEvalTime).Start()
|
evalTimer := q.stats.GetTimer(stats.EvalTotalTime).Start()
|
||||||
defer evalTimer.Stop()
|
defer evalTimer.Stop()
|
||||||
|
|
||||||
// The base context might already be canceled on the first iteration (e.g. during shutdown).
|
// The base context might already be canceled on the first iteration (e.g. during shutdown).
|
||||||
|
|
|
@ -19,7 +19,7 @@ type QueryTiming int
|
||||||
|
|
||||||
// Query timings.
|
// Query timings.
|
||||||
const (
|
const (
|
||||||
TotalEvalTime QueryTiming = iota
|
EvalTotalTime QueryTiming = iota
|
||||||
ResultSortTime
|
ResultSortTime
|
||||||
QueryPreparationTime
|
QueryPreparationTime
|
||||||
InnerEvalTime
|
InnerEvalTime
|
||||||
|
@ -31,8 +31,8 @@ const (
|
||||||
// Return a string representation of a QueryTiming identifier.
|
// Return a string representation of a QueryTiming identifier.
|
||||||
func (s QueryTiming) String() string {
|
func (s QueryTiming) String() string {
|
||||||
switch s {
|
switch s {
|
||||||
case TotalEvalTime:
|
case EvalTotalTime:
|
||||||
return "Total eval time"
|
return "Eval total time"
|
||||||
case ResultSortTime:
|
case ResultSortTime:
|
||||||
return "Result sorting time"
|
return "Result sorting time"
|
||||||
case QueryPreparationTime:
|
case QueryPreparationTime:
|
||||||
|
@ -52,7 +52,7 @@ func (s QueryTiming) String() string {
|
||||||
|
|
||||||
// QueryStats with all query timers mapped to durations.
|
// QueryStats with all query timers mapped to durations.
|
||||||
type QueryStats struct {
|
type QueryStats struct {
|
||||||
TotalEvalTime float64 `json:"totalEvalTime"`
|
EvalTotalTime float64 `json:"evalTotalTime"`
|
||||||
ResultSortTime float64 `json:"resultSortTime"`
|
ResultSortTime float64 `json:"resultSortTime"`
|
||||||
QueryPreparationTime float64 `json:"queryPreparationTime"`
|
QueryPreparationTime float64 `json:"queryPreparationTime"`
|
||||||
InnerEvalTime float64 `json:"innerEvalTime"`
|
InnerEvalTime float64 `json:"innerEvalTime"`
|
||||||
|
@ -68,8 +68,8 @@ func NewQueryStats(tg *TimerGroup) *QueryStats {
|
||||||
|
|
||||||
for s, timer := range tg.timers {
|
for s, timer := range tg.timers {
|
||||||
switch s {
|
switch s {
|
||||||
case TotalEvalTime:
|
case EvalTotalTime:
|
||||||
qs.TotalEvalTime = timer.Duration()
|
qs.EvalTotalTime = timer.Duration()
|
||||||
case ResultSortTime:
|
case ResultSortTime:
|
||||||
qs.ResultSortTime = timer.Duration()
|
qs.ResultSortTime = timer.Duration()
|
||||||
case QueryPreparationTime:
|
case QueryPreparationTime:
|
||||||
|
|
Loading…
Reference in a new issue