Repository navigation
Print the sent counts on the periodic [stats] line - #66
Merged
Merged
Conversation
The [stats] line counted what the pipeline hands over, so a supervisor could not tell what reached the relay until [final], and not at all after a run that was stopped or failed. Read moqxr's counts through Publisher::stats() while the publish runs and add sent_objects and sent_bytes to the line. They add up over the connections of a run, so a reconnection does not start them again at 0. [final] uses the same sum, and after a publish that ended without a final count it gives the last reading in place of unknown. Refs #60
Contributor
|
Thanks for this. One issue: when a connection fails (MoqxrPublisher.cpp:422-451), the loop |
This was referenced Nov 19, 2026
Merged
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.
Refs #60. Covers the
sent_objectsandsent_bytesrequest; the one-time line for an accepted namespace is not in this PR.The
[stats]line now ends withsent_objects=N sent_bytes=B: what moqxr has written, read throughPublisher::stats()while the publish runs. They add up over the connections of the run, so a reconnection does not start them again at 0, and[final]uses the same sum. They readunknownbefore the first reading. After a publish that ended without a final count,[final]gives the last reading instead ofunknown.The zeros that #60 reported at exit come from moqxr, which dropped the counts of a session that ended in a failure. That is fixed in openmoq/moqxr#152. This PR does not need it for the periodic line, which reads the live session. It needs a moqxr release with it for
[final]to give the exact count after a failed publish, until then the last reading stands in.Not done: the one-time line when the relay accepts the namespace. moqxr has no event or flag for it yet.
Tested: new unit checks for the readings and the
[final]fallback inmoqt_draft_test, and a guard incli-final-stats-guards.sh. All tests pass exceptmoq2ts-srt-listener-testsandmoq2ts-srt-link-stats-tests, which segfault on main too. I did not run it against a relay.This change is