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

Function BenchmarkGet

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

Source from the content-addressed store, hash-verified

845}
846
847func BenchmarkGet(b *testing.B) {
848 kms.Unittest = true
849 utils.RemoveAll(testStorePath + "*")
850 kms.ResetBucket()
851
852 x, _ := InitConsistent(testStorePath, new(KMSStorage), false)
853 defer utils.RemoveAll(testStorePath + "*")
854 x.Add(NewNodeFromString("nothing"))
855 b.ResetTimer()
856 for i := 0; i < b.N; i++ {
857 x.GetNeighbor("nothing")
858 }
859}
860
861func BenchmarkGetLarge(b *testing.B) {
862 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