mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-10 15:14:09 +00:00
app/vmselect: make fmt
after f3ece83e67
This commit is contained in:
parent
8516670582
commit
10c63f5853
2 changed files with 8 additions and 8 deletions
|
@ -1002,7 +1002,7 @@ func fixBrokenBuckets(i int, xss []leTimeseries) {
|
|||
if len(xss) < 2 {
|
||||
return
|
||||
}
|
||||
for j := len(xss)-1; j>=0; j-- {
|
||||
for j := len(xss) - 1; j >= 0; j-- {
|
||||
v := xss[j].ts.Values[i]
|
||||
if !math.IsNaN(v) {
|
||||
j++
|
||||
|
@ -1014,7 +1014,7 @@ func fixBrokenBuckets(i int, xss []leTimeseries) {
|
|||
}
|
||||
}
|
||||
vNext := xss[len(xss)-1].ts.Values[i]
|
||||
for j := len(xss)-2; j >= 0; j-- {
|
||||
for j := len(xss) - 2; j >= 0; j-- {
|
||||
v := xss[j].ts.Values[i]
|
||||
if math.IsNaN(v) || v > vNext {
|
||||
xss[j].ts.Values[i] = vNext
|
||||
|
|
|
@ -25,10 +25,10 @@ func TestFixBrokenBuckets(t *testing.T) {
|
|||
}
|
||||
f(nil, []float64{})
|
||||
f([]float64{1}, []float64{1})
|
||||
f([]float64{1,2}, []float64{1,2})
|
||||
f([]float64{2,1}, []float64{1,1})
|
||||
f([]float64{1,2,3,nan,nan},[]float64{1,2,3,3,3})
|
||||
f([]float64{5,1,2,3,nan}, []float64{1,1,2,3,3})
|
||||
f([]float64{1,5,2,nan,6,3}, []float64{1,2,2,3,3,3})
|
||||
f([]float64{5,10,4,3}, []float64{3,3,3,3})
|
||||
f([]float64{1, 2}, []float64{1, 2})
|
||||
f([]float64{2, 1}, []float64{1, 1})
|
||||
f([]float64{1, 2, 3, nan, nan}, []float64{1, 2, 3, 3, 3})
|
||||
f([]float64{5, 1, 2, 3, nan}, []float64{1, 1, 2, 3, 3})
|
||||
f([]float64{1, 5, 2, nan, 6, 3}, []float64{1, 2, 2, 3, 3, 3})
|
||||
f([]float64{5, 10, 4, 3}, []float64{3, 3, 3, 3})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue