Lines Matching full: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.
50 importPath string // import path of the package containing the benchmark
72 // before a benchmark starts, but it can also used to resume timing after
97 // ResetTimer zeros the elapsed benchmark time and memory allocation counters.
112 // If this is called, the benchmark will report ns/op and MB/s.
115 // ReportAllocs enables malloc statistics for this benchmark.
117 // benchmark function that calls ReportAllocs.
129 // runN runs a single benchmark for the specified number of iterations.
147 b.Errorf("race detected during execution of benchmark")
239 // run executes the benchmark in a separate goroutine, including all of its
253 // Running func Benchmark.
264 // launch launches the benchmark function. It gradually increases the number
265 // of benchmark iterations until the benchmark runs for the requested benchtime.
275 // Run the benchmark for at least the specified amount of time.
295 // The results of a benchmark run.
360 // benchmarkName returns full name of benchmark including procs suffix.
371 maxLen int // The largest recorded benchmark name.
398 for _, Benchmark := range benchmarks {
399 if _, matched, _ := ctx.match.fullName(nil, Benchmark.Name); matched {
400 bs = append(bs, Benchmark)
401 benchName := benchmarkName(Benchmark.Name, maxprocs)
415 for _, Benchmark := range bs {
416 b.Run(Benchmark.Name, Benchmark.F)
451 // the benchmark failed.
476 // A subbenchmark is like any other benchmark. A benchmark that calls Run at
479 // Since b has subbenchmarks, we will no longer run it as a benchmark itself.
519 // used to give some meaningful results in case func Benchmark is used in
524 // in sequence in a single benchmark.
540 // trimOutput shortens the output from a benchmark, which can be very long.
542 // The output is likely to appear multiple times because the benchmark
581 // RunParallel runs a benchmark in parallel.
641 // Benchmark benchmarks a single function. Useful for creating
645 // subbenchmarks that don't call Run in sequence in a single benchmark.
646 func Benchmark(f func(b *B)) BenchmarkResult {