Skip to content

Simple Go utility for writing benchmark tests

License

Notifications You must be signed in to change notification settings

go-toolbelt/benchmark

Repository files navigation

benchmark

Simple Go utility for writing benchmark tests

Example Usage

func TestBenchmarkExample(t *testing.T) {
	benchmark.Test(
		t,
		func(b *testing.B) {
			// Write code to benchmark here.
			...
		},
		benchmark.ZeroAllocsPerOp(),
	)
}