Lines Matching defs:B
93 type B struct { struct
94 common
95 importPath string // import path of the package containing the benchmark
96 context *benchContext
97 N int
98 previousN int // number of iterations in the previous run
99 previousDuration time.Duration // total duration of the previous run
100 benchFunc func(b *B)
101 benchTime durationOrCountFlag
102 bytes int64
103 missingBytes bool // one of the subbenchmarks does not have bytes set.
104 timerOn bool
105 showAllocResult bool
106 result BenchmarkResult
107 parallelism int // RunParallel creates parallelism*GOMAXPROCS goroutines
109 startAllocs uint64
110 startBytes uint64
112 netAllocs uint64
113 netBytes uint64
115 extra map[string]float64
121 func (b *B) StartTimer() {
134 func (b *B) StopTimer() {
147 func (b *B) ResetTimer() {
168 func (b *B) SetBytes(n int64) { b.bytes = n }
173 func (b *B) ReportAllocs() {
178 func (b *B) runN(n int) {
201 func (b *B) run1() bool {
245 func (b *B) run() {
265 func (b *B) doBench() BenchmarkResult {
275 func (b *B) launch() {
325 func (b *B) Elapsed() time.Duration {
342 func (b *B) ReportMetric(n float64, unit string) {
624 func (b *B) Run(name string, f func(b *B)) bool {
692 func (b *B) add(other BenchmarkResult) {
712 func (b *B) trimOutput() {
765 func (b *B) RunParallel(body func(*PB)) {
809 func (b *B) SetParallelism(p int) {
823 func Benchmark(f func(b *B)) BenchmarkResult {