my-emacs-d/elpa/yasnippet-20161022.646/snippets/go-mode/parallel_benchmark

13 lines
204 B
Plaintext
Raw Normal View History

# -*- mode: snippet -*-
# name: parallel_benchmark
# key: parbench
# contributor : @kostya-sh
# --
func Benchmark$1(b *testing.B) {
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
$0
}
})
}