MCPcopy Create free account
hub / github.com/evilsocket/sum / BenchmarkLoaderLoad

Function BenchmarkLoaderLoad

storage/loader_benchmark_test.go:9–20  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

7)
8
9func BenchmarkLoaderLoad(b *testing.B) {
10 if err := Flush(&testRecord, testDatFile); err != nil {
11 b.Fatal(err)
12 }
13
14 var rec pb.Record
15 for i := 0; i < b.N; i++ {
16 if err := Load(testDatFile, &rec); err != nil {
17 b.Fatalf("erorr loading %s: %s", testDatFile, err)
18 }
19 }
20}

Callers

nothing calls this directly

Calls 2

FlushFunction · 0.85
LoadFunction · 0.85

Tested by

no test coverage detected