(b *testing.B)
| 426 | } |
| 427 | |
| 428 | func 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 | } |
nothing calls this directly
no test coverage detected