Skip to content

Glossary: Go in Practice

Benchmark

Also written: benchmarks, BenchmarkXxx, b.Loop

A test that times code. It is named `BenchmarkXxx`, takes a `*testing.B`, and runs its body inside `for b.Loop()`.

Where the book teaches it

Related terms

ns/opProfilebenchstat