You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
kratos/pkg/stat/sys/cpu/stat_test.go

20 lines
286 B

package cpu
import (
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func TestStat(t *testing.T) {
time.Sleep(time.Second * 2)
var s Stat
var i Info
ReadStat(&s)
i = GetInfo()
assert.NotZero(t, s.Usage)
assert.NotZero(t, i.Frequency)
assert.NotZero(t, i.Quota)
}