(b *testing.B)
| 919 | } |
| 920 | |
| 921 | func BenchmarkGetTwoLarge(b *testing.B) { |
| 922 | kms.Unittest = true |
| 923 | utils.RemoveAll(testStorePath + "*") |
| 924 | kms.ResetBucket() |
| 925 | |
| 926 | x, _ := InitConsistent(testStorePath, new(KMSStorage), false) |
| 927 | defer utils.RemoveAll(testStorePath + "*") |
| 928 | for i := 0; i < 10; i++ { |
| 929 | x.Add(NewNodeFromString("start" + strconv.Itoa(i))) |
| 930 | } |
| 931 | b.ResetTimer() |
| 932 | for i := 0; i < b.N; i++ { |
| 933 | x.GetTwoNeighbors("nothing") |
| 934 | } |
| 935 | } |
| 936 | |
| 937 | // from @edsrzf on github:. |
| 938 | func TestAddCollision(t *testing.T) { |
nothing calls this directly
no test coverage detected