func deepStack(depth int, b *testing.B) stack.Trace { if depth > 0 { return deepStack(depth-1, b) } b.StartTimer() s := stack.Callers() b.StopTimer() return s }
func BenchmarkCallers(b *testing.B) { for i := 0; i < b.N; i++ { stack.Callers() } }