-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: split read/write hotspot of hotspot_partition_calculator #592
Conversation
a182110
to
a5df324
Compare
a5df324
to
e738ae8
Compare
} | ||
} | ||
} | ||
standard_deviation = sqrt(standard_deviation / (sample_count - 1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
standard_deviation = sqrt(standard_deviation / (sample_count - 1)); | |
standard_deviation = sqrt(standard_deviation / (sample_count - 1)); |
(sample_count - 1)
Why sub 1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to https://en.wikipedia.org/wiki/Standard_deviation, the denominator in the sample standard deviation formula is N − 1.
Co-authored-by: Wu Tao <wutao1@xiaomi.com>
What problem does this PR solve?
This submission is mainly to change the data structure of historical partition hotspot statistical and split read/write hotspot of hotspot_partition_calculator
What is changed and how it works?
In the previous design,
_partition_stat_histories
saved instd::queue
, which is a bad design.in this PR, I will deprecate the formal data structure, change
queue
intolist
to save memory copy then split read/write hotpot of statistical, and add some unit tests by the wayFile changes
src/server/hotspot_partition_data.h -> src/server/hotspot_partition_stat.h