实现节点看板(仅对企业版开放)

This commit is contained in:
GoEdgeLab
2021-07-06 20:06:57 +08:00
parent 3a286cefca
commit 0a86a68348
4 changed files with 46 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ import (
func TestTrafficStatManager_Add(t *testing.T) {
manager := NewTrafficStatManager()
for i := 0; i < 100; i++ {
manager.Add(1, 10, 1, 0)
manager.Add(1, "goedge.cn", 1, 0, 0, 0)
}
t.Log(manager.itemMap)
}
@@ -16,7 +16,7 @@ func TestTrafficStatManager_Add(t *testing.T) {
func TestTrafficStatManager_Upload(t *testing.T) {
manager := NewTrafficStatManager()
for i := 0; i < 100; i++ {
manager.Add(1, 10, 1, 0)
manager.Add(1, "goedge.cn", 1, 0, 0, 0)
}
err := manager.Upload()
if err != nil {
@@ -30,6 +30,6 @@ func BenchmarkTrafficStatManager_Add(b *testing.B) {
manager := NewTrafficStatManager()
for i := 0; i < b.N; i++ {
manager.Add(1, 1024, 1, 0)
manager.Add(1, "goedge.cn", 1024, 1, 0, 0)
}
}