Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2040 from grafana/fix-benchmarks-in-log-func
Browse files Browse the repository at this point in the history
fix benchmarks
  • Loading branch information
robert-milan authored Aug 12, 2022
2 parents 9a03ab6 + ebe0734 commit 79b6a89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions expr/func_log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,16 @@ func BenchmarkLog10k_1000AllSeriesHalfNulls(b *testing.B) {
benchmarkLog(b, 1000, test.RandFloatsWithNulls10k, test.RandFloatsWithNulls10k)
}

func benchmarkLog(b *testing.B, numSeries int, fn0, fn1 func() []schema.Point) {
func benchmarkLog(b *testing.B, numSeries int, fn0, fn1 test.DataFunc) {
var input []models.Series
for i := 0; i < numSeries; i++ {
series := models.Series{
QueryPatt: strconv.Itoa(i),
}
if i%2 == 0 {
series.Datapoints = fn0()
series.Datapoints, series.Interval = fn0()
} else {
series.Datapoints = fn1()
series.Datapoints, series.Interval = fn1()
}
input = append(input, series)
}
Expand Down

0 comments on commit 79b6a89

Please sign in to comment.