(b *testing.B)
| 813 | } |
| 814 | |
| 815 | func BenchmarkCycle(b *testing.B) { |
| 816 | kms.Unittest = true |
| 817 | utils.RemoveAll(testStorePath + "*") |
| 818 | kms.ResetBucket() |
| 819 | |
| 820 | x, _ := InitConsistent(testStorePath, new(KMSStorage), false) |
| 821 | defer utils.RemoveAll(testStorePath + "*") |
| 822 | x.Add(NewNodeFromString("nothing")) |
| 823 | b.ResetTimer() |
| 824 | for i := 0; i < b.N; i++ { |
| 825 | x.Add(NewNodeFromString("foo" + strconv.Itoa(i))) |
| 826 | x.Remove(NodeID("foo" + strconv.Itoa(i))) |
| 827 | } |
| 828 | } |
| 829 | |
| 830 | func BenchmarkCycleLarge(b *testing.B) { |
| 831 | kms.Unittest = true |
nothing calls this directly
no test coverage detected