Skip to content
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

add max to histogram stats #1968

Closed
wants to merge 4 commits into from
Closed

add max to histogram stats #1968

wants to merge 4 commits into from

Conversation

ajkr
Copy link
Contributor

@ajkr ajkr commented Mar 9, 2017

Domas enlightened me about p100 (i.e., max) stats. Let's add them to our histograms.

Test Plan:

./db_bench -statistics -benchmarks=fillrandom -num=100000 -write_buffer_size=1048576 -rate_limiter_bytes_per_sec=1048576
...
rocksdb.db.write.micros statistics Percentiles :=> 50 : 2.923655 95 : 5.334560 99 : 8.709867 100 : 1122733.000000
...

@facebook-github-bot
Copy link
Contributor

@ajkr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@@ -411,6 +411,9 @@ struct HistogramData {
double percentile99;
double average;
double standard_deviation;
// zero-initialize new members since old Statistics::histogramData()
Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM, but I don't understand this comment. What is the problem with old implementations ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if a user has an old subclass of Statistics, their implementation of histogramData() won't write anything to max until they update it. I updated ours via the change in util/histogram.cc, which is used by StatisticsImpl::histogramData()

Copy link
Contributor

@IslamAbdelRahman IslamAbdelRahman left a comment

Choose a reason for hiding this comment

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

Makes sense !

@facebook-github-bot
Copy link
Contributor

@ajkr updated the pull request - view changes - changes since last import

@facebook-github-bot
Copy link
Contributor

@ajkr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@ajkr updated the pull request - view changes - changes since last import

@facebook-github-bot
Copy link
Contributor

@ajkr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@ajkr updated the pull request - view changes - changes since last import

@facebook-github-bot
Copy link
Contributor

@ajkr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@IslamAbdelRahman
Copy link
Contributor

@ajkr, can you please take a look at this issue #1979

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.

None yet

3 participants