-
Notifications
You must be signed in to change notification settings - Fork 62
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
Revise DataSize
& DataRate
#481
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* `DataSize#add(long bytes)`, add by an amount of byte * `DataSize#subtract(long bytes)`, subtract by an amount of byte * `DataSize#bytes()`, a way to get bytes from DataSize, might overflow tho. * `DataSize#perSecond()`, a way to convert data size to data rate * `DataRate#doubleByteRate()`, a way to convert DataRate to bytes/second in double * `DataRate#longByteRate()`, a way to convert DataRate to bytes/second in long * `DataRate#dataSize()`, a way to convert DataRate to size per second * `DataRate.fromDouble()`, a way to convert a double measurement with byte/second as unit to DataRate * `DataRate.fromLong()`, a way to convert a long measurement with byte/second as unit to DataRate
chia7712
reviewed
Jul 15, 2022
chia7712
reviewed
Jul 15, 2022
chia7712
reviewed
Jul 16, 2022
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.
@garyparrot 感謝嘗試重構,底下有幾個問題跟PR無關,但都跟重構DataSize
and DataRate
有關
chia7712
reviewed
Jul 16, 2022
chia7712
reviewed
Jul 16, 2022
chia7712
reviewed
Jul 16, 2022
# Conflicts: # app/src/main/java/org/astraea/app/performance/Manager.java # app/src/main/java/org/astraea/app/performance/Performance.java # app/src/test/java/org/astraea/app/performance/DataSupplierTest.java
chia7712
reviewed
Jul 17, 2022
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.
@garyparrot 感謝更新,還有幾個疑問請看一下
@garyparrot 感謝完成重構,期待其他PR也能有如此高水準的表現 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DataSize#add(long bytes)
, add by an amount of byteDataSize#subtract(long bytes)
, subtract by an amount of byteDataSize#bytes()
, a way to get bytes from DataSize, might overflow tho.DataSize#perSecond()
, a way to convert data size to data rateDataRate#doubleByteRate()
, a way to convert DataRate to bytes/second in doubleDataRate#longByteRate()
, a way to convert DataRate to bytes/second in longDataRate#dataSize()
, a way to convert DataRate to size per secondDataRate.fromDouble()
, a way to convert a double measurement with byte/second as unit to DataRateDataRate.fromLong()
, a way to convert a long measurement with byte/second as unit to DataRateDataSize.ZERO
, zero byte, useful for Stream#reduce related operation.