MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / BenchmarkFileList_Exist

Function BenchmarkFileList_Exist

internal/caches/list_file_sqlite_test.go:428–447  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

426}
427
428func BenchmarkFileList_Exist(b *testing.B) {
429 if !testutils.IsSingleTesting() {
430 return
431 }
432
433 var list = caches.NewSQLiteFileList(Tea.Root + "/data/cache-index/p1")
434
435 defer func() {
436 _ = list.Close()
437 }()
438
439 err := list.Init()
440 if err != nil {
441 b.Fatal(err)
442 }
443 b.ResetTimer()
444 for i := 0; i < b.N; i++ {
445 _, _, _ = list.Exist("f0eb5b87e0b0041f3917002c0707475f" + types.String(i))
446 }
447}

Callers

nothing calls this directly

Calls 6

IsSingleTestingFunction · 0.92
NewSQLiteFileListFunction · 0.92
CloseMethod · 0.65
InitMethod · 0.65
ExistMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected