mirror of https://github.com/prometheus/prometheus
parent
c0ce35d2d3
commit
bf7d87aed2
|
@ -36,6 +36,7 @@ func NewBenchmark(b *testing.B, input string) *Benchmark {
|
|||
|
||||
// Run runs the benchmark.
|
||||
func (b *Benchmark) Run() {
|
||||
defer b.t.Close()
|
||||
b.b.ReportAllocs()
|
||||
b.b.ResetTimer()
|
||||
for i := 0; i < b.b.N; i++ {
|
||||
|
|
|
@ -204,6 +204,8 @@ load 10s
|
|||
if err != nil {
|
||||
t.Fatalf("unexpected error creating test: %q", err)
|
||||
}
|
||||
defer test.Close()
|
||||
|
||||
err = test.Run()
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error initializing test: %q", err)
|
||||
|
|
Loading…
Reference in New Issue