-
Couldn't load subscription status.
- Fork 3.4k
HBASE-29040 Fix description of "sampleRate" of PerformanceEvaluation #6558
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
Conversation
| this.status = status; | ||
| this.testName = this.getClass().getSimpleName(); | ||
| everyN = (int) (opts.totalRows / (opts.totalRows * opts.sampleRate)); | ||
| everyN = (int) (1 / opts.sampleRate); |
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.
This is unrelated to the problem described, but I thought why not.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
| this.status = status; | ||
| this.testName = this.getClass().getSimpleName(); | ||
| everyN = (long) (opts.totalRows / (opts.totalRows * opts.sampleRate)); | ||
| everyN = (long) (1 / opts.sampleRate); |
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.
I'm not sure whether (long) (1 / 1.0) will give us the correct result? Could it be 0?
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.
AFAIK, we don't have to worry about it because 1.0 (1 / 20) has a finite binary representation (unlike numbers like 0.1 or 0.2), so (1 / 1.0) will not yield any arithmetic error.
irb(main):001> [0].pack('G').bytes.map { "%08b" % it }.join
=> "0000000000000000000000000000000000000000000000000000000000000000"
irb(main):002> [1].pack('G').bytes.map { "%08b" % it }.join
=> "0011111111110000000000000000000000000000000000000000000000000000"
irb(main):003> [0.1].pack('G').bytes.map { "%08b" % it }.join
=> "0011111110111001100110011001100110011001100110011001100110011010"
irb(main):004> [0.2].pack('G').bytes.map { "%08b" % it }.join
=> "0011111111001001100110011001100110011001100110011001100110011010"
https://en.wikipedia.org/wiki/Double-precision_floating-point_format#Double-precision_examples
…6558) Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 670deaa)
…6558) Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 670deaa)
…6558) Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 670deaa)
…6558) Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 670deaa)
…pache#6558) Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 670deaa)
…pache#6558) Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 670deaa)
…luation (apache#6558)" This reverts commit 4b725dd4b096a803297618874d97d75906f07607.
The option applies to all tests since HBASE-10788.