MCPcopy Create free account
hub / github.com/CovenantSQL/CovenantSQL / TestLoad

Function TestLoad

metric/loadavg_linux_test.go:18–30  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

16import "testing"
17
18func TestLoad(t *testing.T) {
19 want := []float64{0.21, 0.37, 0.39}
20 loads, err := parseLoad("0.21 0.37 0.39 1/719 19737")
21 if err != nil {
22 t.Fatal(err)
23 }
24
25 for i, load := range loads {
26 if want[i] != load {
27 t.Fatalf("want load %f, got %f", want[i], load)
28 }
29 }
30}

Callers

nothing calls this directly

Calls 3

parseLoadFunction · 0.85
FatalMethod · 0.80
FatalfMethod · 0.80

Tested by

no test coverage detected