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:
David Kaltschmidt 2017-11-17 17:46:51 +01:00
parent af75ce02c1
commit 87c46ea6c3
2 changed files with 7 additions and 7 deletions

View file

@ -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).

View file

@ -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: