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

Function TestNewMetaFile_Large

internal/utils/bfs/meta_file_test.go:29–49  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

27}
28
29func TestNewMetaFile_Large(t *testing.T) {
30 var count = 2
31
32 if testutils.IsSingleTesting() {
33 count = 100
34 }
35
36 var before = time.Now()
37 for i := 0; i < count; i++ {
38 mFile, err := bfs.OpenMetaFile("testdata/test2.m", &sync.RWMutex{})
39 if err != nil {
40 if bfs.IsNotExist(err) {
41 continue
42 }
43 t.Fatal(err)
44 }
45 _ = mFile.Close()
46 }
47 var costMs = time.Since(before).Seconds() * 1000
48 t.Logf("cost: %.2fms, qps: %.2fms/file", costMs, costMs/float64(count))
49}
50
51func TestNewMetaFile_Memory(t *testing.T) {
52 var count = 2

Callers

nothing calls this directly

Calls 4

IsSingleTestingFunction · 0.92
OpenMetaFileFunction · 0.92
IsNotExistFunction · 0.92
CloseMethod · 0.65

Tested by

no test coverage detected