Skip to content

Commit 2a0ff18

Browse files
committed
roachtest: fix sumCounterIncreases
Fix a typo in `sumCounterIncreases` which was previously overshooting, i.e., double counting. Epic: none Release note: None
1 parent 9be613e commit 2a0ff18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/cmd/roachtest/tests/ts_util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func sumCounterIncreases(dataPoints []tspb.TimeSeriesDatapoint) (sum float64) {
9191
sum += dataPoints[i].Value
9292
continue
9393
}
94-
sum += dataPoints[i].Value - dataPoints[0].Value
94+
sum += dataPoints[i].Value - dataPoints[i-1].Value
9595
}
9696
return sum
9797
}

0 commit comments

Comments
 (0)