Files
go-zero/core/stat/internal/cpu_linux_test.go

20 lines
257 B
Go
Raw Permalink Normal View History

2020-07-26 17:09:05 +08:00
package internal
2020-10-07 18:07:54 +08:00
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestRefreshCpu(t *testing.T) {
2021-09-29 13:09:20 +08:00
assert.NotPanics(t, func() {
RefreshCpu()
})
2020-10-07 18:07:54 +08:00
}
2020-07-26 17:09:05 +08:00
func BenchmarkRefreshCpu(b *testing.B) {
for i := 0; i < b.N; i++ {
RefreshCpu()
}
}