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

Function TestCheckHourlyLoad

internal/utils/idles/run_test.go:15–28  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

13)
14
15func TestCheckHourlyLoad(t *testing.T) {
16 for i := 0; i < 10; i++ {
17 idles.CheckHourlyLoad(5)
18 idles.CheckHourlyLoad(1)
19 idles.CheckHourlyLoad(3)
20 idles.CheckHourlyLoad(2)
21 idles.CheckHourlyLoad(4)
22 }
23
24 t.Log(idles.TestMinLoadHours())
25 for h, v := range idles.TestHourlyLoadMap() {
26 t.Log(types.String(h)+":", v.Avg)
27 }
28}
29
30func TestRun(t *testing.T) {
31 idles.TestSetMinLoadHours([]int{0, time.Now().Hour()})

Callers

nothing calls this directly

Calls 5

CheckHourlyLoadFunction · 0.92
TestMinLoadHoursFunction · 0.92
TestHourlyLoadMapFunction · 0.92
LogMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected