cpu_linux_test.go 243 B

1234567891011121314151617
  1. package internal
  2. import (
  3. "testing"
  4. "github.com/stretchr/testify/assert"
  5. )
  6. func TestRefreshCpu(t *testing.T) {
  7. assert.True(t, RefreshCpu() >= 0)
  8. }
  9. func BenchmarkRefreshCpu(b *testing.B) {
  10. for i := 0; i < b.N; i++ {
  11. RefreshCpu()
  12. }
  13. }