MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / BenchmarkGetLarge

Function BenchmarkGetLarge

consistent/consistent_test.go:861–875  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

859}
860
861func 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
877func BenchmarkGetN(b *testing.B) {
878 kms.Unittest = true

Callers

nothing calls this directly

Calls 6

RemoveAllFunction · 0.92
ResetBucketFunction · 0.92
InitConsistentFunction · 0.85
NewNodeFromStringFunction · 0.85
GetNeighborMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected