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

Function BenchmarkGetTwo

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

Source from the content-addressed store, hash-verified

905}
906
907func BenchmarkGetTwo(b *testing.B) {
908 kms.Unittest = true
909 utils.RemoveAll(testStorePath + "*")
910 kms.ResetBucket()
911
912 x, _ := InitConsistent(testStorePath, new(KMSStorage), false)
913 defer utils.RemoveAll(testStorePath + "*")
914 x.Add(NewNodeFromString("nothing"))
915 b.ResetTimer()
916 for i := 0; i < b.N; i++ {
917 x.GetTwoNeighbors("nothing")
918 }
919}
920
921func BenchmarkGetTwoLarge(b *testing.B) {
922 kms.Unittest = true

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected