Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumGobenchmarksSingle-choice MCQ

What does b.RunParallel with a pb.Next() loop measure, and how is b.N involved?

func BenchmarkCache(b *testing.B) { b.RunParallel(func(pb *testing.PB) { for pb.Next() { cache.Get("k") } }) }