mirror of https://github.com/prometheus/prometheus
Fix whitespace with "make format".
parent
86e5edc7fe
commit
a20bf35997
|
@ -48,7 +48,7 @@ func (serv MetricsService) QueryRange(Expr string, End int64, Range int64, Step
|
||||||
Step = 1
|
Step = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if End - Range < 0 {
|
if End-Range < 0 {
|
||||||
Range = End
|
Range = End
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,9 +57,9 @@ func (serv MetricsService) QueryRange(Expr string, End int64, Range int64, Step
|
||||||
|
|
||||||
matrix := ast.EvalVectorRange(
|
matrix := ast.EvalVectorRange(
|
||||||
exprNode.(ast.VectorNode),
|
exprNode.(ast.VectorNode),
|
||||||
time.Unix(End - Range, 0),
|
time.Unix(End-Range, 0),
|
||||||
time.Unix(End, 0),
|
time.Unix(End, 0),
|
||||||
time.Duration(Step) * time.Second)
|
time.Duration(Step)*time.Second)
|
||||||
|
|
||||||
sort.Sort(matrix)
|
sort.Sort(matrix)
|
||||||
return ast.TypedValueToJSON(matrix, "matrix")
|
return ast.TypedValueToJSON(matrix, "matrix")
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A Fingerprint is a simplified representation of an entity---e.g., a hash of
|
// A Fingerprint is a simplified representation of an entity---e.g., a hash of
|
||||||
|
|
|
@ -537,7 +537,6 @@ func (matrix Matrix) Swap(i, j int) {
|
||||||
matrix[i], matrix[j] = matrix[j], matrix[i]
|
matrix[i], matrix[j] = matrix[j], matrix[i]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (node *StringLiteral) Eval(timestamp *time.Time) string {
|
func (node *StringLiteral) Eval(timestamp *time.Time) string {
|
||||||
return node.str
|
return node.str
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue