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

Function TestDAUManager_Truncate

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

Source from the content-addressed store, hash-verified

92}
93
94func TestDAUManager_Truncate(t *testing.T) {
95 var manager = stats.NewDAUManager()
96 err := manager.Init()
97 if err != nil {
98 t.Fatal(err)
99 }
100
101 err = manager.Truncate()
102 if err != nil {
103 t.Fatal(err)
104 }
105
106 err = manager.Flush()
107 if err != nil {
108 t.Fatal(err)
109 }
110}
111
112func BenchmarkDAUManager_AddIP_Cache(b *testing.B) {
113 runtime.GOMAXPROCS(1)

Callers

nothing calls this directly

Calls 4

NewDAUManagerFunction · 0.92
InitMethod · 0.65
FlushMethod · 0.65
TruncateMethod · 0.45

Tested by

no test coverage detected