loadavg: Split the collector for linux and other platforms.

This commit is contained in:
Siavash Safi 2015-06-24 16:38:43 +04:30
commit d80b2af492
3 changed files with 81 additions and 1 deletions

View file

@ -0,0 +1,14 @@
package collector
import "testing"
func TestLoad(t *testing.T) {
load, err := parseLoad("0.21 0.37 0.39 1/719 19737")
if err != nil {
t.Fatal(err)
}
if want := 0.21; want != load {
t.Fatalf("want load %f, got %f", want, load)
}
}