test pushing and popping from the registry
(t *testing.B)
| 713 | |
| 714 | // test pushing and popping from the registry |
| 715 | func BenchmarkRegistryPushPopAutoGrow(t *testing.B) { |
| 716 | al := newAllocator(32) |
| 717 | sz := 256 * 20 |
| 718 | reg := newRegistry(registryTestHandler(0), sz/2, 64, sz, al) |
| 719 | value := LString("test") |
| 720 | |
| 721 | t.ResetTimer() |
| 722 | |
| 723 | for j := 0; j < t.N; j++ { |
| 724 | for i := 0; i < sz; i++ { |
| 725 | reg.Push(value) |
| 726 | } |
| 727 | for i := 0; i < sz; i++ { |
| 728 | reg.Pop() |
| 729 | } |
| 730 | } |
| 731 | } |
| 732 | |
| 733 | func BenchmarkRegistryPushPopFixed(t *testing.B) { |
| 734 | al := newAllocator(32) |
nothing calls this directly
no test coverage detected
searching dependent graphs…