cpu_linux_test.go 257 B

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