github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/src/testlist/bench_test.go (about)

     1  package testlist
     2  
     3  import (
     4  	"fmt"
     5  	"testing"
     6  )
     7  
     8  func BenchmarkSimplefunc(b *testing.B) {
     9  	b.StopTimer()
    10  	b.StartTimer()
    11  	for i := 0; i < b.N; i++ {
    12  		_ = fmt.Sprint("Test for bench")
    13  	}
    14  }