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:
parent
3543960689
commit
fb9e88e07d
4 changed files with 164 additions and 0 deletions
14
rapl-daemon/util_test.go
Normal file
14
rapl-daemon/util_test.go
Normal 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()
|
||||
}
|
||||
}
|
Reference in a new issue