(b *testing.B)
| 875 | } |
| 876 | |
| 877 | func BenchmarkGetN(b *testing.B) { |
| 878 | kms.Unittest = true |
| 879 | utils.RemoveAll(testStorePath + "*") |
| 880 | kms.ResetBucket() |
| 881 | |
| 882 | x, _ := InitConsistent(testStorePath, new(KMSStorage), false) |
| 883 | defer utils.RemoveAll(testStorePath + "*") |
| 884 | x.Add(NewNodeFromString("nothing")) |
| 885 | b.ResetTimer() |
| 886 | for i := 0; i < b.N; i++ { |
| 887 | x.GetNeighbors("nothing", 3) |
| 888 | } |
| 889 | } |
| 890 | |
| 891 | func BenchmarkGetNLarge(b *testing.B) { |
| 892 | kms.Unittest = true |
nothing calls this directly
no test coverage detected