@@ -85,7 +85,7 @@ func (o Objective) QueryErrors(window model.Duration) string {
8585 }
8686
8787 if o .Indicator .Latency != nil && o .Indicator .Latency .Total .Name != "" {
88- expr , err := parser .ParseExpr (`sum by(grouping) (metric{matchers="total"}) - sum by(grouping) (errorMetric{matchers="errors"})` )
88+ expr , err := parser .ParseExpr (`sum by (grouping) (metric{matchers="total"}) - sum by (grouping) (errorMetric{matchers="errors"})` )
8989 if err != nil {
9090 return ""
9191 }
@@ -394,7 +394,7 @@ func (r objectiveReplacer) replace(node parser.Node) {
394394
395395func (o Objective ) RequestRange (timerange time.Duration ) string {
396396 if o .Indicator .Ratio != nil && o .Indicator .Ratio .Total .Name != "" {
397- expr , err := parser .ParseExpr (`sum by(group) (rate(metric{}[1s])) > 0` )
397+ expr , err := parser .ParseExpr (`sum by (group) (rate(metric{}[1s])) > 0` )
398398 if err != nil {
399399 return err .Error ()
400400 }
@@ -433,7 +433,7 @@ func (o Objective) RequestRange(timerange time.Duration) string {
433433
434434func (o Objective ) ErrorsRange (timerange time.Duration ) string {
435435 if o .Indicator .Ratio != nil && o .Indicator .Ratio .Total .Name != "" {
436- expr , err := parser .ParseExpr (`sum by(group) (rate(errorMetric{matchers="errors"}[1s])) / scalar(sum(rate(metric{matchers="total"}[1s]))) > 0` )
436+ expr , err := parser .ParseExpr (`sum by (group) (rate(errorMetric{matchers="errors"}[1s])) / scalar(sum(rate(metric{matchers="total"}[1s]))) > 0` )
437437 if err != nil {
438438 return err .Error ()
439439 }
@@ -477,7 +477,7 @@ func (o Objective) DurationRange(timerange time.Duration, percentile float64) st
477477 }
478478
479479 if o .Indicator .Latency != nil && o .Indicator .Latency .Total .Name != "" {
480- expr , err := parser .ParseExpr (`histogram_quantile(0.420, sum by(le) (rate(errorMetric{matchers="errors"}[1s])))` )
480+ expr , err := parser .ParseExpr (`histogram_quantile(0.420, sum by (le) (rate(errorMetric{matchers="errors"}[1s])))` )
481481 if err != nil {
482482 return err .Error ()
483483 }
0 commit comments