Add a warning whenever lost/missed events occur#74
Open
curche wants to merge 5 commits intotarides:mainfrom
Open
Add a warning whenever lost/missed events occur#74curche wants to merge 5 commits intotarides:mainfrom
curche wants to merge 5 commits intotarides:mainfrom
Conversation
Previously the runtime callback for whenever lost events occur only prints out that info into stdin With this commit, olly keeps note of lost events using a ref so as to print a warning towards the end of the summary
lost events can also occur during tracing and so it didn't make sense to refer to just Summary in the warning message. An alternative idea was to add a new lost_event handler in config and only keep a counter during gc_stats while defaulting to the previous behaviour (just printing) while tracing. However, having a warning felt sensible for both tracing & gc_stats for now and we can address it in future if required
d0e3d5a to
9cbcf1e
Compare
Author
|
Rebased changes on top of package updates. CI looks ok now |
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.
Brief description
Whenever olly detects any events that couldn't be read before being overwritten in the runtime ring buffer, we print a warning about the same at the end of the run (and refers to the missed events section in readme)
Similar to how hyperfine reports of statistical discrepancies during runs, but this one's simpler and mostly just informative.
Other details
The implementation for now is just using a
ref 0that increments - the value of which doesn't really matter just that its either zero or positive non-zero.The other alternatives were a) something with effect handlers (but that felt a bit overkill) or b) having a warning only during gc-stats through an updated config (but it seemed like both trace and gc-stats (& future options) could benefit from showing the warning)
I've kept the
Printfinlost_eventsbut maybe that could be reconsidered now that the final result gives a warning for lost events - the benefit being that excessive no of lost events will not affect the target executable's output (if any)Sample new output
To trigger lost events, it was easier to use infer (refer #63)