Conversation
AnthonyLim23
reviewed
Sep 1, 2026
| let repr = hist.__repr__(); | ||
|
|
||
| assert!(repr.contains("time range 0.5, 2.5")); | ||
| assert!(repr.contains("time range 0.5μs - 2.5μs")); |
Collaborator
There was a problem hiding this comment.
the units used in this label don't match those above (nano), I think having it in microseconds is more intuitive, @wilkojohnny what do you think?
Collaborator
Author
There was a problem hiding this comment.
the display string is in microseconds: see Histogram.__repr__
pub fn __repr__(&self) -> String {
let shape = self.hist.shape();
let mut string = format!(
"Histogram with:\n time range {}μs - {}μs",
(self.min_time.to_micros()),
(self.max_time.to_micros())I kept all user interface stuff in microseconds, it just uses nanoseconds internally to avoid unit conversion in the histogram calculation.
alexhroom
force-pushed
the
93-bad-counting
branch
from
September 2, 2026 08:43
95c3d50 to
6013106
Compare
|
👋 Hi, @alexhroom, Conflicts have been detected against the base branch. Please rebase your branch against the base branch. This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
alexhroom
force-pushed
the
93-bad-counting
branch
from
September 7, 2026 07:25
3df5250 to
c08c691
Compare
alexhroom
force-pushed
the
93-bad-counting
branch
from
September 14, 2026 10:15
c08c691 to
78ec269
Compare
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.
Fixes #93. There was an erroneous extra count per frame added in #65. Not sure where that came from, but this PR removes it and adds a check to the histogram tests that
nis correct.Also fixes #98 by changing the histograms to use nanoseconds for time ranges internally.