Initial work on rapl-daemon. Initial server set up. API to read max power per zone and API to write new power cap have both been written.

This commit is contained in:
Renan DelValle 2020-01-04 13:23:10 -08:00
parent 3543960689
commit fb9e88e07d
No known key found for this signature in database
GPG key ID: 3895800E03F17676
4 changed files with 164 additions and 0 deletions

14
rapl-daemon/util_test.go Normal file
View file

@ -0,0 +1,14 @@
package main
import "testing"
// TODO(rdelvalle): Add more thourough testing. Generate mock files
// that mimic the powercap subsystem and create test to operate on it.
func TestCap(t *testing.T) {
err := capNode("/sys/devices/virtual/powercap/intel-rapl", 95)
if err != nil {
t.Fail()
}
}