PromQL: Fix parser benchmark (#6495)

The parser benchmarks called the `ParseMetric` function instead of the `ParseExpr` function, which resulted in parsing failing every time.

This means only the case of PromQL parser failure was benchmarked.

Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
This commit is contained in:
Tobias Guggenmos 2019-12-20 12:30:41 +01:00 committed by Brian Brazil
parent 1e0cd28bf6
commit a48acbcb23
1 changed files with 2 additions and 2 deletions

View File

@ -250,7 +250,7 @@ func BenchmarkParser(b *testing.B) {
b.Run(c, func(b *testing.B) {
b.ReportAllocs()
for i := 0; i < b.N; i++ {
ParseMetric(c)
ParseExpr(c)
}
})
}
@ -259,7 +259,7 @@ func BenchmarkParser(b *testing.B) {
b.Run(name, func(b *testing.B) {
b.ReportAllocs()
for i := 0; i < b.N; i++ {
ParseMetric(c)
ParseExpr(c)
}
})
}