Rapl node capping daemon #21

Merged
ridv merged 18 commits from raplDaemon into master 2020-01-19 19:52:32 +00:00
Showing only changes of commit 64effeef2c - Show all commits

View file

@ -2,6 +2,7 @@ package main
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
import (
"io/ioutil"
"log"
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
"math"
"os"
"path/filepath"
@ -12,65 +13,67 @@ import (
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
"github.com/stretchr/testify/assert"
)
var raplDir string
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
const maxWattage uint64 = 1500000
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
func TestMain(m *testing.M) {
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
var err error
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
raplDir, err = ioutil.TempDir("", raplPrefixCPU)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
if err != nil {
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
log.Fatal(err)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
}
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
defer os.RemoveAll(raplDir)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
// Create temporary directory that mocks powercap subsytem
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
zonePath := filepath.Join(raplDir, raplPrefixCPU+":0")
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
err = os.Mkdir(zonePath, 755)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
if err != nil {
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
log.Fatal(err)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
}
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
initialWatts := strconv.FormatUint(maxWattage, 10)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
err = ioutil.WriteFile(filepath.Join(zonePath, maxPowerFileShortWindow), []byte(initialWatts), 0444)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
if err != nil {
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
log.Fatal(err)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
}
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
err = ioutil.WriteFile(filepath.Join(zonePath, powerLimitFileShortWindow), []byte(initialWatts), 0644)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
if err != nil {
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
log.Fatal(err)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
}
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
os.Exit(m.Run())
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
}
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
// TODO(rdelvalle): Create filesystem only once and allow tests to use it
func TestCapNode(t *testing.T) {
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
RAPLdir, err := ioutil.TempDir("", "intel-rapl")
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
assert.NoError(t, err)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
defer os.RemoveAll(RAPLdir)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
zonePath := filepath.Join(RAPLdir, raplPrefixCPU+":0")
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
err = os.Mkdir(zonePath, 755)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
assert.NoError(t, err)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
err = ioutil.WriteFile(filepath.Join(zonePath, maxPowerFileShortWindow), []byte("1500000"), 0444)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
assert.NoError(t, err)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
err = ioutil.WriteFile(filepath.Join(zonePath, powerLimitFileShortWindow), []byte("1500000"), 0644)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
assert.NoError(t, err)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
err = capNode(RAPLdir, 95)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
err := capNode(raplDir, 95)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
assert.NoError(t, err)
}
func TestMaxPower(t *testing.T) {
const maxWattage uint64 = 1500000
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
maxFile := filepath.Join(raplDir, raplPrefixCPU+":0", maxPowerFileShortWindow)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
tmpfile, err := ioutil.TempFile("", maxPowerFileShortWindow)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
assert.NoError(t, err)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
defer os.Remove(tmpfile.Name())
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
_, err = tmpfile.Write([]byte(strconv.FormatUint(maxWattage, 10)))
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
assert.NoError(t, err)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
maxWatts, err := maxPower(tmpfile.Name())
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
maxWatts, err := maxPower(maxFile)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
assert.NoError(t, err)
assert.Equal(t, maxWattage, maxWatts)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
err = tmpfile.Close()
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
assert.NoError(t, err)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
}
func TestCapZone(t *testing.T) {
const maxPower float64 = 1500000
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
const percentage float64 = .50
tmpfile, err := ioutil.TempFile("", powerLimitFileShortWindow)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
powercap := uint64(math.Ceil(float64(maxWattage) * percentage))
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
limitFile := filepath.Join(raplDir, raplPrefixCPU+":0", powerLimitFileShortWindow)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
err := capZone(limitFile, powercap)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
assert.NoError(t, err)
defer os.Remove(tmpfile.Name())
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
powercap := uint64(math.Ceil(maxPower * percentage))
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
err = capZone(tmpfile.Name(), powercap)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
assert.NoError(t, err)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
newCapBytes, err := ioutil.ReadFile(tmpfile.Name())
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
newCapBytes, err := ioutil.ReadFile(limitFile)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
assert.NoError(t, err)
newCap, err := strconv.ParseUint(strings.TrimSpace(string(newCapBytes)), 10, 64)
assert.NoError(t, err)
assert.Equal(t, powercap, newCap)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
err = tmpfile.Close()
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
assert.NoError(t, err)
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
}

pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.
pradykaushik commented 2020-01-13 19:45:13 +00:00 (Migrated from github.com)

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default.
Although, I do not mind the camelcasing.

I think it's safe to use spaces ("bad percentage") as the words are hyphenated by default. Although, I do not mind the camelcasing.
ridv commented 2020-01-18 01:22:53 +00:00 (Migrated from github.com)

Good point, fixed.

Good point, fixed.