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

Function TestKVFileList_CleanMatchKey

internal/caches/list_file_kv_test.go:392–409  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

390}
391
392func TestKVFileList_CleanMatchKey(t *testing.T) {
393 var list = testOpenKVFileList(t)
394 defer func() {
395 _ = list.Close()
396 }()
397
398 var before = time.Now()
399
400 defer func() {
401 var costSeconds = time.Since(before).Seconds()
402 t.Log("cost:", fmt.Sprintf("%.2fms", costSeconds*1000))
403 }()
404
405 err := list.CleanMatchKey("https://*.example.com/index.html123")
406 if err != nil {
407 t.Fatal(err)
408 }
409}
410
411func BenchmarkKVFileList_Exist(b *testing.B) {
412 var list = caches.NewKVFileList(Tea.Root + "/data/stores/cache-stores")

Callers

nothing calls this directly

Calls 4

testOpenKVFileListFunction · 0.85
LogMethod · 0.80
CloseMethod · 0.65
CleanMatchKeyMethod · 0.65

Tested by

no test coverage detected