this test will intentionally not incur stack growth in order to bench the performance when no allocations happen
(t *testing.B)
| 616 | |
| 617 | // this test will intentionally not incur stack growth in order to bench the performance when no allocations happen |
| 618 | func BenchmarkCallFrameStackPushPopShallowAutoGrow(t *testing.B) { |
| 619 | stack := newAutoGrowingCallFrameStack(256) |
| 620 | |
| 621 | t.ResetTimer() |
| 622 | |
| 623 | const Iterations = 8 |
| 624 | for j := 0; j < t.N; j++ { |
| 625 | for i := 0; i < Iterations; i++ { |
| 626 | stack.Push(callFrame{}) |
| 627 | } |
| 628 | for i := 0; i < Iterations; i++ { |
| 629 | stack.Pop() |
| 630 | } |
| 631 | } |
| 632 | } |
| 633 | |
| 634 | func BenchmarkCallFrameStackPushPopShallowFixed(t *testing.B) { |
| 635 | stack := newFixedCallFrameStack(256) |
nothing calls this directly
no test coverage detected
searching dependent graphs…