(b *testing.B)
| 828 | } |
| 829 | |
| 830 | func BenchmarkCycleLarge(b *testing.B) { |
| 831 | kms.Unittest = true |
| 832 | utils.RemoveAll(testStorePath + "*") |
| 833 | kms.ResetBucket() |
| 834 | |
| 835 | x, _ := InitConsistent(testStorePath, new(KMSStorage), false) |
| 836 | defer utils.RemoveAll(testStorePath + "*") |
| 837 | for i := 0; i < 10; i++ { |
| 838 | x.Add(NewNodeFromString("start" + strconv.Itoa(i))) |
| 839 | } |
| 840 | b.ResetTimer() |
| 841 | for i := 0; i < b.N; i++ { |
| 842 | x.Add(NewNodeFromString("foo" + strconv.Itoa(i))) |
| 843 | x.Remove(NodeID("foo" + strconv.Itoa(i))) |
| 844 | } |
| 845 | } |
| 846 | |
| 847 | func BenchmarkGet(b *testing.B) { |
| 848 | kms.Unittest = true |
nothing calls this directly
no test coverage detected