diff options
| -rw-r--r-- | core/replica.zig | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/replica.zig b/core/replica.zig index c68848f2..3a36a06b 100644 --- a/core/replica.zig +++ b/core/replica.zig @@ -568,6 +568,8 @@ pub const Stats = struct { /// the authority did not share), or another's unit first. mispredicted: u32 = 0, foreign: u32 = 0, + /// The copy put back at `rebase_after` kept units with inputs applied + /// on top: the kept units replayed, the inputs applied again. rebases: u32 = 0, units: u32 = 0, /// Its digest compared with the session's (a unit's, or quiet). @@ -1041,13 +1043,13 @@ pub const Replica = struct { const kept = r.gpa.dupe(u8, unit) catch return r.fail("out of memory"); r.since.append(r.gpa, kept) catch return r.fail("out of memory"); if (r.since.items.len >= rebase_after) { - r.stats.rebases += 1; // Nothing on top: it is the confirmed state already. if (r.applied == 0) { r.copy.release(); rollback.Epoch.select(null); return r.clearSince(); } + r.stats.rebases += 1; r.toConfirmed(); r.dirty = true; } @@ -3241,13 +3243,13 @@ pub const Link = struct { var buf: [1024]u8 = undefined; const e = &c.r.echo.stats; var w: std.Io.Writer = .fixed(&buf); - w.print("inputs {d} at_once {d} stopped {d} units {d} fast {d} neutral {d} mispredicted {d} foreign {d} visible {d} rtt_us {d} spec_us {d}/{d} copy_us {d}/{d} rollback_us {d}/{d} join_ms {d} blobs {d} from_memory {d} from_disk {d} sent_kb {d} echo {d}/{d} confirmed {d} missed {d} draws {d} again {d}", .{ + w.print("inputs {d} at_once {d} stopped {d} units {d} fast {d} neutral {d} mispredicted {d} foreign {d} visible {d} rtt_us {d} spec_us {d}/{d} copy_us {d}/{d} rollback_us {d}/{d} join_ms {d} blobs {d} from_memory {d} from_disk {d} sent_kb {d} echo {d}/{d} confirmed {d} missed {d} draws {d} again {d} rebases {d} copies {d} checks {d}", .{ st.inputs, st.speculated, st.stopped, st.units, st.fast, c.r.neutral, st.mispredicted, st.foreign, c.visible, c.r.rtt_ns / 1000, pctOf(st.spec_ns.items, 50) / 1000, pctOf(st.spec_ns.items, 99) / 1000, pctOf(st.copy_ns.items, 50) / 1000, pctOf(st.copy_ns.items, 99) / 1000, pctOf(st.rollback_ns.items, 50) / 1000, pctOf(st.rollback_ns.items, 99) / 1000, c.join_ms, c.join.blobs, c.join.from_memory, c.join.from_disk, c.join.sent_bytes >> 10, e.predicted, e.predicted + e.unpredicted, e.confirmed, e.mispredicted, - c.draws, c.again, + c.draws, c.again, st.rebases, st.copies, st.checks, }) catch return; // What stopped its inputs, last: a word a pair before it. w.writeAll(" stops ") catch return; |
