feat: the status bar and the exit dump report resequencing, holes and stale packets
This commit is contained in:
1 parent
d38ab3f9c9
commit
fc81e661d0
5 files changed
+59
-2
No files matched your search
@@ -79,6 +79,21 @@ std::string format_detail(const StatusSnapshot& s) {
|
||||
s.plot1_traces, s.plot1_samples, s.buffer_mb, s.span_s,
|
||||
static_cast<unsigned long long>(s.time_stride));
|
||||
std::string out = buf;
|
||||
// Nothing about resequencing is said at all while all six read zero, which is a stream that
|
||||
// never lost ordering: the field would otherwise be six zeros on every clean run, and this
|
||||
// string is read by eye out of the exit dump.
|
||||
if (s.resequenced || s.late || s.stale || s.holes || s.hole_slots || s.backfilled) {
|
||||
char note[160];
|
||||
std::snprintf(note, sizeof(note),
|
||||
" | reseq %llu late %llu stale %llu holes %llu (%llu slots, %llu filled)",
|
||||
static_cast<unsigned long long>(s.resequenced),
|
||||
static_cast<unsigned long long>(s.late),
|
||||
static_cast<unsigned long long>(s.stale),
|
||||
static_cast<unsigned long long>(s.holes),
|
||||
static_cast<unsigned long long>(s.hole_slots),
|
||||
static_cast<unsigned long long>(s.backfilled));
|
||||
out += note;
|
||||
}
|
||||
if (s.paused) out += " | paused for " + format_elapsed(s.paused_for_s);
|
||||
if (s.trigger_on) {
|
||||
out += s.have_event ? " | last event " + format_elapsed(s.since_event_s) + " ago"
|
||||
|
||||
Reference in new issue
Block a user