device_handbrake: Warn when simulation lags behind real time#11
Open
LingaoM wants to merge 1 commit intoBabbleSim:masterfrom
Open
device_handbrake: Warn when simulation lags behind real time#11LingaoM wants to merge 1 commit intoBabbleSim:masterfrom
LingaoM wants to merge 1 commit intoBabbleSim:masterfrom
Conversation
3bfda7e to
f7d1c1e
Compare
aescolar
reviewed
Apr 26, 2026
Contributor
There was a problem hiding this comment.
Would you be so kind as to sign-off the commit?
https://babblesim.github.io/contribution_guidelines.html
| } | ||
| bs_trace_raw(6,"@%"PRItime" Stalled until real time = %"PRIuMAX"\n", wait_s.end, (uintmax_t)Expected_time); | ||
| } else { | ||
| bs_trace_raw(4,"@%"PRItime" Handbrake lagging behind real time by %"PRIi64" us\n", wait_s.end, -diff); |
Contributor
There was a problem hiding this comment.
Suggested change
| bs_trace_raw(4,"@%"PRItime" Handbrake lagging behind real time by %"PRIi64" us\n", wait_s.end, -diff); | |
| bs_trace_raw(4,"@%"PRItime" Simulation lagging behind real time by %"PRIi64" us\n", wait_s.end, -diff); |
When the host is too slow to keep up with the requested ratio, the handbrake silently skips stalling. Add a trace message at level 4 to indicate how far behind real time the simulation is lagging. Document this behavior in the README. Use trace level 4 instead of bs_trace_warning_line because lagging behind real time is expected under high load and not an error condition. Using warning level would flood the output in normal use cases. Level 4 is used (rather than 6, which is used for normal stall messages) to make the lag more visible since it indicates the handbrake is not achieving the requested ratio. Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
f7d1c1e to
ee8841e
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.
When the host is too slow to keep up with the requested ratio, the
handbrake silently skips stalling. Add a trace message at level 4 to
indicate how far behind real time the simulation is lagging.
Document this behavior in the README.
Use trace level 4 instead of bs_trace_warning_line because lagging
behind real time is expected under high load and not an error condition.
Using warning level would flood the output in normal use cases.
Level 4 is used (rather than 6, which is used for normal stall messages)
to make the lag more visible since it indicates the handbrake is not
achieving the requested ratio.