one more bench
Vladimir Bauer
7 years ago
| 29 | 29 | bar.Increment() |
| 30 | 30 | } |
| 31 | 31 | } |
| 32 | ||
| 33 | func BenchmarkIncrSingleBarWithNameAndEwmaETADecorator(b *testing.B) { | |
| 34 | p := New(WithOutput(ioutil.Discard)) | |
| 35 | bar := p.AddBar(int64(b.N), | |
| 36 | PrependDecorators(decor.Name("test")), | |
| 37 | AppendDecorators(decor.EwmaETA(decor.ET_STYLE_GO, 60)), | |
| 38 | ) | |
| 39 | for i := 0; i < b.N; i++ { | |
| 40 | bar.Increment() | |
| 41 | } | |
| 42 | } |