diff options
Diffstat (limited to 'test/replicas.zig')
| -rw-r--r-- | test/replicas.zig | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/replicas.zig b/test/replicas.zig index f3618cf1..1acd1c11 100644 --- a/test/replicas.zig +++ b/test/replicas.zig @@ -383,8 +383,10 @@ fn run(r: Run, dir: []const u8, totals: *Totals) !void { const t0 = screens.encode_ns; const before = totals.delta_bytes; try flushAll(&screens, a.core, peers[0..r.clients], &owed, &queue, &n, m.at, &down, random, one_way, jitter, &versions, totals); - if (screens.encode_ns > t0) try totals.frame_ns.append(gpa, screens.encode_ns - t0); - if (m.at >= flood_at and (flood_end == 0 or m.at <= flood_end)) totals.flood_delta_bytes += totals.delta_bytes - before; + if (m.at >= flood_at and (flood_end == 0 or m.at <= flood_end)) { + totals.flood_delta_bytes += totals.delta_bytes - before; + try totals.frame_ns.append(gpa, screens.encode_ns - t0); + } // Frames go on while anything moves, and a second after. const busy = typing > 0 or flood_end == 0 or queue.count() > 0; frames_left = if (busy) 60 else frames_left -| 1; @@ -537,7 +539,7 @@ pub fn main(init: std.process.Init) !void { }); if (t.divergences > 0 or t.unequal > 0 or t.screens_wrong > 0) failed = true; } - std.debug.print("terminals: deltas a replica applied a second under the flood; a peer's bytes a second under the flood (deltas, units); encode a frame for every peer, apply a delta (us); rows fetched; resets; deltas checked/wrong\n", .{}); + std.debug.print("terminals: deltas a replica applied a second under the flood; a peer's bytes a second under the flood (deltas, units); encode a frame of the flood for every peer, apply a delta (us); rows fetched; resets; deltas checked/wrong\n", .{}); std.debug.print(" rtt deltas/s delta B/s unit B/s encode p50/p99 apply p50/p99 fetched resets checked/wrong\n{s}", .{term_lines.items}); if (failed) std.process.exit(1); } |
