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

Function TestDAUManager_AddIP

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

Source from the content-addressed store, hash-verified

12)
13
14func TestDAUManager_AddIP(t *testing.T) {
15 var manager = stats.NewDAUManager()
16 err := manager.Init()
17 if err != nil {
18 t.Fatal(err)
19 }
20
21 manager.AddIP(1, "127.0.0.1")
22 manager.AddIP(1, "127.0.0.2")
23 manager.AddIP(1, "127.0.0.3")
24 manager.AddIP(1, "127.0.0.4")
25 manager.AddIP(1, "127.0.0.2")
26 manager.AddIP(1, "127.0.0.3")
27
28 time.Sleep(1 * time.Second)
29
30 err = manager.Close()
31 if err != nil {
32 t.Fatal(err)
33 }
34
35 t.Log("======")
36 manager.TestInspect(t)
37}
38
39func TestDAUManager_AddIP_Many(t *testing.T) {
40 var manager = stats.NewDAUManager()

Callers

nothing calls this directly

Calls 6

NewDAUManagerFunction · 0.92
LogMethod · 0.80
InitMethod · 0.65
CloseMethod · 0.65
AddIPMethod · 0.45
TestInspectMethod · 0.45

Tested by

no test coverage detected