Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Oct 3, 2019

regrtest WindowsLoadTracker: the LOAD_FACTOR_1 constant has been
computed for a sampling rate of 5 seconds.

https://bugs.python.org/issue36670

regrtest WindowsLoadTracker: the LOAD_FACTOR_1 constant has been
computed for a sampling rate of 5 seconds.
Copy link
Member

@ammaraskar ammaraskar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with either increasing the sampling interval or using the new 1s constant.

# Exponential damping factor (see below)
# Seconds per measurement
SAMPLING_INTERVAL = 5
# Exponential damping factor for a sampling interval of 5 seconds (see below)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comment, I should have had this in here originally. I think it might be worth adding a little explanation like:

# Calculated using 1/exp(5sec/1min) = 1/exp(5/60)

the source is https://github.com/torvalds/linux/blob/master/include/linux/sched/loadavg.h#L21

If you feel like 1 second is better, then the new constant would be 0.98347145382161748947374 https://www.wolframalpha.com/input/?i=1%2Fexp%281%2F60%29

@vstinner
Copy link
Member Author

vstinner commented Oct 3, 2019

I merged PR #16556 instead.

@vstinner vstinner closed this Oct 3, 2019
@vstinner vstinner deleted the typeperf_5sec branch January 30, 2020 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants