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

Function TestDAUManager_CleanStats

internal/stats/dau_manager_test.go:62–82  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

60}
61
62func TestDAUManager_CleanStats(t *testing.T) {
63 var manager = stats.NewDAUManager()
64 err := manager.Init()
65 if err != nil {
66 t.Fatal(err)
67 }
68
69 var before = time.Now()
70 defer func() {
71 t.Log("cost:", time.Since(before).Seconds()*1000, "ms")
72 }()
73
74 defer func() {
75 _ = manager.Flush()
76 }()
77
78 err = manager.CleanStats()
79 if err != nil {
80 t.Fatal(err)
81 }
82}
83
84func TestDAUManager_TestInspect(t *testing.T) {
85 var manager = stats.NewDAUManager()

Callers

nothing calls this directly

Calls 5

NewDAUManagerFunction · 0.92
LogMethod · 0.80
CleanStatsMethod · 0.80
InitMethod · 0.65
FlushMethod · 0.65

Tested by

no test coverage detected