{{ message }}
Replace System.currentTimeMillis() by System.nanoTime()#509
Closed
wilderrodrigues wants to merge 2 commits into
Closed
Replace System.currentTimeMillis() by System.nanoTime()#509wilderrodrigues wants to merge 2 commits into
wilderrodrigues wants to merge 2 commits into
Conversation
- System.nanoTime() is the best way to measure elapsed time in Java. - It gives a resolution on the order of microseconds The System.currentTimeMillis() is used when calculating absolut time.
- Cover when the profile is not started/stopped
Contributor
There was a problem hiding this comment.
I'd use a new name for the var, like startTickInNanos (and of course stopTickInNanos)
Contributor
Author
There was a problem hiding this comment.
The nanoTime() is given in Microseconds. So, the MS still fits in.
Cheers,
Wilder
Contributor
Author
kishankavala
pushed a commit
to kishankavala/cloudstack
that referenced
this pull request
Jun 25, 2015
- Cover when the profile is not started/stopped Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com> This closes apache#509
shwstppr
added a commit
to shapeblue/cloudstack
that referenced
this pull request
Jan 27, 2025
Addresses: shapeblue/cloudstack-apple#490 Adds framework layer change to allow retrieving and storing IOPS stats for storage pools. Custom `PrimaryStoreDriver` can implement method - `getStorageIopsStats` for returning IOPS stats. Existing method `getUsedIops` can also be overridden by such plugins when only used IOPS is returned. For testing purpose, implementation has been added for simulator hypervisor plugin to return capacity and used IOPS for a pool. For local storage pool, implementation has been added using iostat to return currently used IOPS. StoragePoolResponse class has been updated to return IOPS values which allows showing IOPS values in UI for different storage pool related views and APIs. Schema changes: [fr83-schema-changes.sql.txt](https://github.com/user-attachments/files/18006838/fr83-schema-changes.sql.txt) Upstream PR: apache#10034 --------- Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This file contains hidden or 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
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.

Add unit tests to cover negative cases
Test Environment
Tests successfully executed: