1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-10 00:29:01 +02:00
kratos/pkg/stat/sys/cpu/stat_test.go

21 lines
286 B
Go
Raw Normal View History

2019-02-01 09:57:43 +02:00
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)
}