13 lines
204 B
Plaintext
13 lines
204 B
Plaintext
|
# -*- 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
|
||
|
}
|
||
|
})
|
||
|
}
|