(b *testing.B)
| 992 | } |
| 993 | |
| 994 | func BenchmarkState_Reset(b *testing.B) { |
| 995 | b.ReportAllocs() |
| 996 | |
| 997 | for b.Loop() { |
| 998 | st := newState() |
| 999 | // add a fixed number of keys before clearing |
| 1000 | for j := range 100 { |
| 1001 | st.Set("key"+strconv.Itoa(j), j) |
| 1002 | } |
| 1003 | st.Reset() |
| 1004 | } |
| 1005 | } |
| 1006 | |
| 1007 | func BenchmarkState_Keys(b *testing.B) { |
| 1008 | b.ReportAllocs() |