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 3d9f92a9c0 - Show all commits

View file

@ -47,7 +47,7 @@ func capNode(base string, percentage int) error {
pradykaushik commented 2020-01-13 19:22:44 +00:00 (Migrated from github.com)

constraint_1 is the shorter window.

constraint_1 is the shorter window.
pradykaushik commented 2020-01-13 19:23:24 +00:00 (Migrated from github.com)

maybe just say cap percentage must be in the range (0, 100].

maybe just say **cap percentage must be in the range (0, 100]**.
pradykaushik commented 2020-01-13 19:29:52 +00:00 (Migrated from github.com)

constraint_0 is the longer window.
Going by this we are intending to use the longer window for running average calculations.
So, change the variable name to maxPowerFileLongWindow?

constraint_0 is the longer window. Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations. So, change the variable name to `maxPowerFileLongWindow`?
pradykaushik commented 2020-01-13 19:32:00 +00:00 (Migrated from github.com)

ditto.

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

overflows

overflow~s~
pradykaushik commented 2020-01-13 19:38:12 +00:00 (Migrated from github.com)

fits on a single line.

fits on a single line.
ridv commented 2020-01-17 17:34:53 +00:00 (Migrated from github.com)

Can you expand on this comment?

Can you expand on this comment?
pradykaushik commented 2020-01-17 22:19:20 +00:00 (Migrated from github.com)

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
pradykaushik commented 2020-01-17 22:20:18 +00:00 (Migrated from github.com)

Either change overflows to overflow, or get rid of the "an".

Either change **overflows** to **overflow**, or get rid of the "an".
ridv commented 2020-01-18 01:21:46 +00:00 (Migrated from github.com)

Good catch, fixed.

Good catch, fixed.
ridv commented 2020-01-18 01:22:14 +00:00 (Migrated from github.com)

Fixed this, definitely a mistake on my part. Thanks for catching it!

Fixed this, definitely a mistake on my part. Thanks for catching it!
ridv commented 2020-01-18 01:22:28 +00:00 (Migrated from github.com)

I'll revert it

I'll revert it
pradykaushik commented 2020-01-13 19:22:44 +00:00 (Migrated from github.com)

constraint_1 is the shorter window.

constraint_1 is the shorter window.
pradykaushik commented 2020-01-13 19:23:24 +00:00 (Migrated from github.com)

maybe just say cap percentage must be in the range (0, 100].

maybe just say **cap percentage must be in the range (0, 100]**.
pradykaushik commented 2020-01-13 19:29:52 +00:00 (Migrated from github.com)

constraint_0 is the longer window.
Going by this we are intending to use the longer window for running average calculations.
So, change the variable name to maxPowerFileLongWindow?

constraint_0 is the longer window. Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations. So, change the variable name to `maxPowerFileLongWindow`?
pradykaushik commented 2020-01-13 19:32:00 +00:00 (Migrated from github.com)

ditto.

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

overflows

overflow~s~
pradykaushik commented 2020-01-13 19:38:12 +00:00 (Migrated from github.com)

fits on a single line.

fits on a single line.
ridv commented 2020-01-17 17:34:53 +00:00 (Migrated from github.com)

Can you expand on this comment?

Can you expand on this comment?
pradykaushik commented 2020-01-17 22:19:20 +00:00 (Migrated from github.com)

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
pradykaushik commented 2020-01-17 22:20:18 +00:00 (Migrated from github.com)

Either change overflows to overflow, or get rid of the "an".

Either change **overflows** to **overflow**, or get rid of the "an".
ridv commented 2020-01-18 01:21:46 +00:00 (Migrated from github.com)

Good catch, fixed.

Good catch, fixed.
ridv commented 2020-01-18 01:22:14 +00:00 (Migrated from github.com)

Fixed this, definitely a mistake on my part. Thanks for catching it!

Fixed this, definitely a mistake on my part. Thanks for catching it!
ridv commented 2020-01-18 01:22:28 +00:00 (Migrated from github.com)

I'll revert it

I'll revert it
}
pradykaushik commented 2020-01-13 19:40:01 +00:00 (Migrated from github.com)

any reason for just printing the error and not returning it?
Basically, the question is whether we need to continue to attempt to powercap if an error occurs anywhere in the process.

any reason for just printing the error and not returning it? Basically, the question is whether we need to continue to attempt to powercap if an error occurs anywhere in the process.
ridv commented 2020-01-17 17:39:01 +00:00 (Migrated from github.com)

Agreed, I don't know what the right path to take is here. If the file write fails, we could be left in an inconsistent state. The only options here are to bail and return an error right away, or to continue trying to cap the node and then returning an array of zones where were unable to cap the node in.

Agreed, I don't know what the right path to take is here. If the file write fails, we could be left in an inconsistent state. The only options here are to bail and return an error right away, or to continue trying to cap the node and then returning an array of zones where were unable to cap the node in.
pradykaushik commented 2020-01-17 22:15:38 +00:00 (Migrated from github.com)

Any chance we can roll back the power limits set to the previous values if and when any of the file writes fail?

Any chance we can roll back the power limits set to the previous values if and when any of the file writes fail?
ridv commented 2020-01-18 01:21:04 +00:00 (Migrated from github.com)

If the write fails, we're sort of left in limbo. If the write to modify it failed, then most likely the write to restore the value will fail too. We can try reading it and seeing if that's the same value as before.

If the write fails, we're sort of left in limbo. If the write to modify it failed, then most likely the write to restore the value will fail too. We can try reading it and seeing if that's the same value as before.
// We use floats to mitigate the possibility of an integer overflows.
powercap := uint(math.Ceil(float64(maxPower) * (float64(percentage) / 100)))
pradykaushik commented 2020-01-13 19:22:44 +00:00 (Migrated from github.com)

constraint_1 is the shorter window.

constraint_1 is the shorter window.
pradykaushik commented 2020-01-13 19:23:24 +00:00 (Migrated from github.com)

maybe just say cap percentage must be in the range (0, 100].

maybe just say **cap percentage must be in the range (0, 100]**.
pradykaushik commented 2020-01-13 19:29:52 +00:00 (Migrated from github.com)

constraint_0 is the longer window.
Going by this we are intending to use the longer window for running average calculations.
So, change the variable name to maxPowerFileLongWindow?

constraint_0 is the longer window. Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations. So, change the variable name to `maxPowerFileLongWindow`?
pradykaushik commented 2020-01-13 19:32:00 +00:00 (Migrated from github.com)

ditto.

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

overflows

overflow~s~
pradykaushik commented 2020-01-13 19:38:12 +00:00 (Migrated from github.com)

fits on a single line.

fits on a single line.
ridv commented 2020-01-17 17:34:53 +00:00 (Migrated from github.com)

Can you expand on this comment?

Can you expand on this comment?
pradykaushik commented 2020-01-17 22:19:20 +00:00 (Migrated from github.com)

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
pradykaushik commented 2020-01-17 22:20:18 +00:00 (Migrated from github.com)

Either change overflows to overflow, or get rid of the "an".

Either change **overflows** to **overflow**, or get rid of the "an".
ridv commented 2020-01-18 01:21:46 +00:00 (Migrated from github.com)

Good catch, fixed.

Good catch, fixed.
ridv commented 2020-01-18 01:22:14 +00:00 (Migrated from github.com)

Fixed this, definitely a mistake on my part. Thanks for catching it!

Fixed this, definitely a mistake on my part. Thanks for catching it!
ridv commented 2020-01-18 01:22:28 +00:00 (Migrated from github.com)

I'll revert it

I'll revert it
powercap := uint64(math.Ceil(float64(maxPower) * (float64(percentage) / 100)))
pradykaushik commented 2020-01-13 19:22:44 +00:00 (Migrated from github.com)

constraint_1 is the shorter window.

constraint_1 is the shorter window.
pradykaushik commented 2020-01-13 19:23:24 +00:00 (Migrated from github.com)

maybe just say cap percentage must be in the range (0, 100].

maybe just say **cap percentage must be in the range (0, 100]**.
pradykaushik commented 2020-01-13 19:29:52 +00:00 (Migrated from github.com)

constraint_0 is the longer window.
Going by this we are intending to use the longer window for running average calculations.
So, change the variable name to maxPowerFileLongWindow?

constraint_0 is the longer window. Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations. So, change the variable name to `maxPowerFileLongWindow`?
pradykaushik commented 2020-01-13 19:32:00 +00:00 (Migrated from github.com)

ditto.

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

overflows

overflow~s~
pradykaushik commented 2020-01-13 19:38:12 +00:00 (Migrated from github.com)

fits on a single line.

fits on a single line.
ridv commented 2020-01-17 17:34:53 +00:00 (Migrated from github.com)

Can you expand on this comment?

Can you expand on this comment?
pradykaushik commented 2020-01-17 22:19:20 +00:00 (Migrated from github.com)

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
pradykaushik commented 2020-01-17 22:20:18 +00:00 (Migrated from github.com)

Either change overflows to overflow, or get rid of the "an".

Either change **overflows** to **overflow**, or get rid of the "an".
ridv commented 2020-01-18 01:21:46 +00:00 (Migrated from github.com)

Good catch, fixed.

Good catch, fixed.
ridv commented 2020-01-18 01:22:14 +00:00 (Migrated from github.com)

Fixed this, definitely a mistake on my part. Thanks for catching it!

Fixed this, definitely a mistake on my part. Thanks for catching it!
ridv commented 2020-01-18 01:22:28 +00:00 (Migrated from github.com)

I'll revert it

I'll revert it
err = capZone(filepath.Join(base, file.Name(), powerLimitFileShortWindow), powercap)
if err != nil {
@ -79,8 +79,8 @@ func maxPower(zone string) (uint64, error) {
pradykaushik commented 2020-01-13 19:22:44 +00:00 (Migrated from github.com)

constraint_1 is the shorter window.

constraint_1 is the shorter window.
pradykaushik commented 2020-01-13 19:23:24 +00:00 (Migrated from github.com)

maybe just say cap percentage must be in the range (0, 100].

maybe just say **cap percentage must be in the range (0, 100]**.
pradykaushik commented 2020-01-13 19:29:52 +00:00 (Migrated from github.com)

constraint_0 is the longer window.
Going by this we are intending to use the longer window for running average calculations.
So, change the variable name to maxPowerFileLongWindow?

constraint_0 is the longer window. Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations. So, change the variable name to `maxPowerFileLongWindow`?
pradykaushik commented 2020-01-13 19:32:00 +00:00 (Migrated from github.com)

ditto.

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

overflows

overflow~s~
pradykaushik commented 2020-01-13 19:38:12 +00:00 (Migrated from github.com)

fits on a single line.

fits on a single line.
ridv commented 2020-01-17 17:34:53 +00:00 (Migrated from github.com)

Can you expand on this comment?

Can you expand on this comment?
pradykaushik commented 2020-01-17 22:19:20 +00:00 (Migrated from github.com)

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
pradykaushik commented 2020-01-17 22:20:18 +00:00 (Migrated from github.com)

Either change overflows to overflow, or get rid of the "an".

Either change **overflows** to **overflow**, or get rid of the "an".
ridv commented 2020-01-18 01:21:46 +00:00 (Migrated from github.com)

Good catch, fixed.

Good catch, fixed.
ridv commented 2020-01-18 01:22:14 +00:00 (Migrated from github.com)

Fixed this, definitely a mistake on my part. Thanks for catching it!

Fixed this, definitely a mistake on my part. Thanks for catching it!
ridv commented 2020-01-18 01:22:28 +00:00 (Migrated from github.com)

I'll revert it

I'll revert it
pradykaushik commented 2020-01-13 19:22:44 +00:00 (Migrated from github.com)

constraint_1 is the shorter window.

constraint_1 is the shorter window.
pradykaushik commented 2020-01-13 19:23:24 +00:00 (Migrated from github.com)

maybe just say cap percentage must be in the range (0, 100].

maybe just say **cap percentage must be in the range (0, 100]**.
pradykaushik commented 2020-01-13 19:29:52 +00:00 (Migrated from github.com)

constraint_0 is the longer window.
Going by this we are intending to use the longer window for running average calculations.
So, change the variable name to maxPowerFileLongWindow?

constraint_0 is the longer window. Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations. So, change the variable name to `maxPowerFileLongWindow`?
pradykaushik commented 2020-01-13 19:32:00 +00:00 (Migrated from github.com)

ditto.

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

overflows

overflow~s~
pradykaushik commented 2020-01-13 19:38:12 +00:00 (Migrated from github.com)

fits on a single line.

fits on a single line.
ridv commented 2020-01-17 17:34:53 +00:00 (Migrated from github.com)

Can you expand on this comment?

Can you expand on this comment?
pradykaushik commented 2020-01-17 22:19:20 +00:00 (Migrated from github.com)

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
pradykaushik commented 2020-01-17 22:20:18 +00:00 (Migrated from github.com)

Either change overflows to overflow, or get rid of the "an".

Either change **overflows** to **overflow**, or get rid of the "an".
ridv commented 2020-01-18 01:21:46 +00:00 (Migrated from github.com)

Good catch, fixed.

Good catch, fixed.
ridv commented 2020-01-18 01:22:14 +00:00 (Migrated from github.com)

Fixed this, definitely a mistake on my part. Thanks for catching it!

Fixed this, definitely a mistake on my part. Thanks for catching it!
ridv commented 2020-01-18 01:22:28 +00:00 (Migrated from github.com)

I'll revert it

I'll revert it
}
// capZone caps a power zone to a specific amount of watts specified by value
func capZone(zone string, value uint) error {
pradykaushik commented 2020-01-13 19:22:44 +00:00 (Migrated from github.com)

constraint_1 is the shorter window.

constraint_1 is the shorter window.
pradykaushik commented 2020-01-13 19:23:24 +00:00 (Migrated from github.com)

maybe just say cap percentage must be in the range (0, 100].

maybe just say **cap percentage must be in the range (0, 100]**.
pradykaushik commented 2020-01-13 19:29:52 +00:00 (Migrated from github.com)

constraint_0 is the longer window.
Going by this we are intending to use the longer window for running average calculations.
So, change the variable name to maxPowerFileLongWindow?

constraint_0 is the longer window. Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations. So, change the variable name to `maxPowerFileLongWindow`?
pradykaushik commented 2020-01-13 19:32:00 +00:00 (Migrated from github.com)

ditto.

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

overflows

overflow~s~
pradykaushik commented 2020-01-13 19:38:12 +00:00 (Migrated from github.com)

fits on a single line.

fits on a single line.
ridv commented 2020-01-17 17:34:53 +00:00 (Migrated from github.com)

Can you expand on this comment?

Can you expand on this comment?
pradykaushik commented 2020-01-17 22:19:20 +00:00 (Migrated from github.com)

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
pradykaushik commented 2020-01-17 22:20:18 +00:00 (Migrated from github.com)

Either change overflows to overflow, or get rid of the "an".

Either change **overflows** to **overflow**, or get rid of the "an".
ridv commented 2020-01-18 01:21:46 +00:00 (Migrated from github.com)

Good catch, fixed.

Good catch, fixed.
ridv commented 2020-01-18 01:22:14 +00:00 (Migrated from github.com)

Fixed this, definitely a mistake on my part. Thanks for catching it!

Fixed this, definitely a mistake on my part. Thanks for catching it!
ridv commented 2020-01-18 01:22:28 +00:00 (Migrated from github.com)

I'll revert it

I'll revert it
err := ioutil.WriteFile(zone, []byte(string(value)), 0644)
pradykaushik commented 2020-01-13 19:22:44 +00:00 (Migrated from github.com)

constraint_1 is the shorter window.

constraint_1 is the shorter window.
pradykaushik commented 2020-01-13 19:23:24 +00:00 (Migrated from github.com)

maybe just say cap percentage must be in the range (0, 100].

maybe just say **cap percentage must be in the range (0, 100]**.
pradykaushik commented 2020-01-13 19:29:52 +00:00 (Migrated from github.com)

constraint_0 is the longer window.
Going by this we are intending to use the longer window for running average calculations.
So, change the variable name to maxPowerFileLongWindow?

constraint_0 is the longer window. Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations. So, change the variable name to `maxPowerFileLongWindow`?
pradykaushik commented 2020-01-13 19:32:00 +00:00 (Migrated from github.com)

ditto.

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

overflows

overflow~s~
pradykaushik commented 2020-01-13 19:38:12 +00:00 (Migrated from github.com)

fits on a single line.

fits on a single line.
ridv commented 2020-01-17 17:34:53 +00:00 (Migrated from github.com)

Can you expand on this comment?

Can you expand on this comment?
pradykaushik commented 2020-01-17 22:19:20 +00:00 (Migrated from github.com)

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
pradykaushik commented 2020-01-17 22:20:18 +00:00 (Migrated from github.com)

Either change overflows to overflow, or get rid of the "an".

Either change **overflows** to **overflow**, or get rid of the "an".
ridv commented 2020-01-18 01:21:46 +00:00 (Migrated from github.com)

Good catch, fixed.

Good catch, fixed.
ridv commented 2020-01-18 01:22:14 +00:00 (Migrated from github.com)

Fixed this, definitely a mistake on my part. Thanks for catching it!

Fixed this, definitely a mistake on my part. Thanks for catching it!
ridv commented 2020-01-18 01:22:28 +00:00 (Migrated from github.com)

I'll revert it

I'll revert it
func capZone(zone string, value uint64) error {
pradykaushik commented 2020-01-13 19:22:44 +00:00 (Migrated from github.com)

constraint_1 is the shorter window.

constraint_1 is the shorter window.
pradykaushik commented 2020-01-13 19:23:24 +00:00 (Migrated from github.com)

maybe just say cap percentage must be in the range (0, 100].

maybe just say **cap percentage must be in the range (0, 100]**.
pradykaushik commented 2020-01-13 19:29:52 +00:00 (Migrated from github.com)

constraint_0 is the longer window.
Going by this we are intending to use the longer window for running average calculations.
So, change the variable name to maxPowerFileLongWindow?

constraint_0 is the longer window. Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations. So, change the variable name to `maxPowerFileLongWindow`?
pradykaushik commented 2020-01-13 19:32:00 +00:00 (Migrated from github.com)

ditto.

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

overflows

overflow~s~
pradykaushik commented 2020-01-13 19:38:12 +00:00 (Migrated from github.com)

fits on a single line.

fits on a single line.
ridv commented 2020-01-17 17:34:53 +00:00 (Migrated from github.com)

Can you expand on this comment?

Can you expand on this comment?
pradykaushik commented 2020-01-17 22:19:20 +00:00 (Migrated from github.com)

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
pradykaushik commented 2020-01-17 22:20:18 +00:00 (Migrated from github.com)

Either change overflows to overflow, or get rid of the "an".

Either change **overflows** to **overflow**, or get rid of the "an".
ridv commented 2020-01-18 01:21:46 +00:00 (Migrated from github.com)

Good catch, fixed.

Good catch, fixed.
ridv commented 2020-01-18 01:22:14 +00:00 (Migrated from github.com)

Fixed this, definitely a mistake on my part. Thanks for catching it!

Fixed this, definitely a mistake on my part. Thanks for catching it!
ridv commented 2020-01-18 01:22:28 +00:00 (Migrated from github.com)

I'll revert it

I'll revert it
err := ioutil.WriteFile(zone, []byte(strconv.FormatUint(value, 10)), 0644)
pradykaushik commented 2020-01-13 19:22:44 +00:00 (Migrated from github.com)

constraint_1 is the shorter window.

constraint_1 is the shorter window.
pradykaushik commented 2020-01-13 19:23:24 +00:00 (Migrated from github.com)

maybe just say cap percentage must be in the range (0, 100].

maybe just say **cap percentage must be in the range (0, 100]**.
pradykaushik commented 2020-01-13 19:29:52 +00:00 (Migrated from github.com)

constraint_0 is the longer window.
Going by this we are intending to use the longer window for running average calculations.
So, change the variable name to maxPowerFileLongWindow?

constraint_0 is the longer window. Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations. So, change the variable name to `maxPowerFileLongWindow`?
pradykaushik commented 2020-01-13 19:32:00 +00:00 (Migrated from github.com)

ditto.

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

overflows

overflow~s~
pradykaushik commented 2020-01-13 19:38:12 +00:00 (Migrated from github.com)

fits on a single line.

fits on a single line.
ridv commented 2020-01-17 17:34:53 +00:00 (Migrated from github.com)

Can you expand on this comment?

Can you expand on this comment?
pradykaushik commented 2020-01-17 22:19:20 +00:00 (Migrated from github.com)

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
pradykaushik commented 2020-01-17 22:20:18 +00:00 (Migrated from github.com)

Either change overflows to overflow, or get rid of the "an".

Either change **overflows** to **overflow**, or get rid of the "an".
ridv commented 2020-01-18 01:21:46 +00:00 (Migrated from github.com)

Good catch, fixed.

Good catch, fixed.
ridv commented 2020-01-18 01:22:14 +00:00 (Migrated from github.com)

Fixed this, definitely a mistake on my part. Thanks for catching it!

Fixed this, definitely a mistake on my part. Thanks for catching it!
ridv commented 2020-01-18 01:22:28 +00:00 (Migrated from github.com)

I'll revert it

I'll revert it
if err != nil {
return err
}

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

constraint_1 is the shorter window.

constraint_1 is the shorter window.
pradykaushik commented 2020-01-13 19:23:24 +00:00 (Migrated from github.com)

maybe just say cap percentage must be in the range (0, 100].

maybe just say **cap percentage must be in the range (0, 100]**.
pradykaushik commented 2020-01-13 19:29:52 +00:00 (Migrated from github.com)

constraint_0 is the longer window.
Going by this we are intending to use the longer window for running average calculations.
So, change the variable name to maxPowerFileLongWindow?

constraint_0 is the longer window. Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations. So, change the variable name to `maxPowerFileLongWindow`?
pradykaushik commented 2020-01-13 19:32:00 +00:00 (Migrated from github.com)

ditto.

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

overflows

overflow~s~
pradykaushik commented 2020-01-13 19:38:12 +00:00 (Migrated from github.com)

fits on a single line.

fits on a single line.
ridv commented 2020-01-17 17:34:53 +00:00 (Migrated from github.com)

Can you expand on this comment?

Can you expand on this comment?
pradykaushik commented 2020-01-17 22:19:20 +00:00 (Migrated from github.com)

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
pradykaushik commented 2020-01-17 22:20:18 +00:00 (Migrated from github.com)

Either change overflows to overflow, or get rid of the "an".

Either change **overflows** to **overflow**, or get rid of the "an".
ridv commented 2020-01-18 01:21:46 +00:00 (Migrated from github.com)

Good catch, fixed.

Good catch, fixed.
ridv commented 2020-01-18 01:22:14 +00:00 (Migrated from github.com)

Fixed this, definitely a mistake on my part. Thanks for catching it!

Fixed this, definitely a mistake on my part. Thanks for catching it!
ridv commented 2020-01-18 01:22:28 +00:00 (Migrated from github.com)

I'll revert it

I'll revert it
pradykaushik commented 2020-01-13 19:22:44 +00:00 (Migrated from github.com)

constraint_1 is the shorter window.

constraint_1 is the shorter window.
pradykaushik commented 2020-01-13 19:23:24 +00:00 (Migrated from github.com)

maybe just say cap percentage must be in the range (0, 100].

maybe just say **cap percentage must be in the range (0, 100]**.
pradykaushik commented 2020-01-13 19:29:52 +00:00 (Migrated from github.com)

constraint_0 is the longer window.
Going by this we are intending to use the longer window for running average calculations.
So, change the variable name to maxPowerFileLongWindow?

constraint_0 is the longer window. Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations. So, change the variable name to `maxPowerFileLongWindow`?
pradykaushik commented 2020-01-13 19:32:00 +00:00 (Migrated from github.com)

ditto.

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

overflows

overflow~s~
pradykaushik commented 2020-01-13 19:38:12 +00:00 (Migrated from github.com)

fits on a single line.

fits on a single line.
ridv commented 2020-01-17 17:34:53 +00:00 (Migrated from github.com)

Can you expand on this comment?

Can you expand on this comment?
pradykaushik commented 2020-01-17 22:19:20 +00:00 (Migrated from github.com)

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.

Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
pradykaushik commented 2020-01-17 22:20:18 +00:00 (Migrated from github.com)

Either change overflows to overflow, or get rid of the "an".

Either change **overflows** to **overflow**, or get rid of the "an".
ridv commented 2020-01-18 01:21:46 +00:00 (Migrated from github.com)

Good catch, fixed.

Good catch, fixed.
ridv commented 2020-01-18 01:22:14 +00:00 (Migrated from github.com)

Fixed this, definitely a mistake on my part. Thanks for catching it!

Fixed this, definitely a mistake on my part. Thanks for catching it!
ridv commented 2020-01-18 01:22:28 +00:00 (Migrated from github.com)

I'll revert it

I'll revert it