Lines Matching refs:benchmark
19 var benchTime = flag.Duration("test.benchtime", 1*time.Second, "run each benchmark for duration `d`")
22 // Global lock to ensure only one benchmark runs at a time.
25 // Used for every benchmark for measuring memory.
35 // B is a type passed to Benchmark functions to manage benchmark
38 // A benchmark ends when its Benchmark function returns or calls any of the methods
40 // only from the goroutine running the Benchmark function.
44 // Like in tests, benchmark logs are accumulated during execution
45 // and dumped to standard error when done. Unlike in tests, benchmark logs
47 // affecting benchmark results.
71 // before a benchmark starts, but it can also used to resume timing after
96 // ResetTimer zeros the elapsed benchmark time and memory allocation counters.
111 // If this is called, the benchmark will report ns/op and MB/s.
114 // ReportAllocs enables malloc statistics for this benchmark.
116 // benchmark function that calls ReportAllocs.
128 // runN runs a single benchmark for the specified number of iterations.
146 b.Errorf("race detected during execution of benchmark")
236 // run executes the benchmark in a separate goroutine, including all of its
243 // Running func Benchmark.
255 // launch launches the benchmark function. It gradually increases the number
256 // of benchmark iterations until the benchmark runs for the requested benchtime.
266 // Run the benchmark for at least the specified amount of time.
286 // The results of a benchmark run.
348 // benchmarkName returns full name of benchmark including procs suffix.
359 maxLen int // The largest recorded benchmark name.
386 for _, Benchmark := range benchmarks {
387 if _, matched := ctx.match.fullName(nil, Benchmark.Name); matched {
388 bs = append(bs, Benchmark)
389 benchName := benchmarkName(Benchmark.Name, maxprocs)
402 for _, Benchmark := range bs {
403 b.Run(Benchmark.Name, Benchmark.F)
437 // the benchmark failed.
461 // A subbenchmark is like any other benchmark. A benchmark that calls Run at
465 // calls must happen before the outer benchmark function for b returns.
467 // Since b has subbenchmarks, we will no longer run it as a benchmark itself.
501 // used to give some meaningful results in case func Benchmark is used in
506 // in sequence in a single benchmark.
522 // trimOutput shortens the output from a benchmark, which can be very long.
524 // The output is likely to appear multiple times because the benchmark
563 // RunParallel runs a benchmark in parallel.
623 // Benchmark benchmarks a single function. Useful for creating
627 // subbenchmarks that don't call Run in sequence in a single benchmark.
628 func Benchmark(f func(b *B)) BenchmarkResult {