(b *testing.B)
| 859 | } |
| 860 | |
| 861 | func BenchmarkGetLarge(b *testing.B) { |
| 862 | kms.Unittest = true |
| 863 | utils.RemoveAll(testStorePath + "*") |
| 864 | kms.ResetBucket() |
| 865 | |
| 866 | x, _ := InitConsistent(testStorePath, new(KMSStorage), false) |
| 867 | defer utils.RemoveAll(testStorePath + "*") |
| 868 | for i := 0; i < 10; i++ { |
| 869 | x.Add(NewNodeFromString("start" + strconv.Itoa(i))) |
| 870 | } |
| 871 | b.ResetTimer() |
| 872 | for i := 0; i < b.N; i++ { |
| 873 | x.GetNeighbor("nothing") |
| 874 | } |
| 875 | } |
| 876 | |
| 877 | func BenchmarkGetN(b *testing.B) { |
| 878 | kms.Unittest = true |
nothing calls this directly
no test coverage detected