diff options
Diffstat (limited to 'test/perf.zig')
| -rw-r--r-- | test/perf.zig | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/perf.zig b/test/perf.zig index 17df0bdc..880e6abe 100644 --- a/test/perf.zig +++ b/test/perf.zig @@ -732,7 +732,7 @@ fn measureTerm(op: TermOp, fx: TermFixture, reps: usize) !Cell { const t0 = nowNs(); switch (op) { .render => {}, - .output => core.update(.{ .output = .{ .pane = 0, .bytes = term_chunk } }), + .output => core.update(.{ .output = .{ .pane = .at(0), .bytes = term_chunk } }), .resize_rows => { rows = if (rows == screen_rows) screen_rows - 1 else screen_rows; core.update(.{ .resize = .{ .cols = cols, .rows = rows } }); @@ -782,7 +782,7 @@ fn bootTerm(fx: TermFixture) !*pardes.Pardes { var off: usize = 0; while (off < text.len) { const end = @min(off + 8192, text.len); - core.update(.{ .output = .{ .pane = 0, .bytes = text[off..end] } }); + core.update(.{ .output = .{ .pane = .at(0), .bytes = text[off..end] } }); pump(core); off = end; } @@ -925,7 +925,7 @@ fn measureUndoOutput(core: *pardes.Pardes, counter: *Allocations, arena: *std.he while (offset < bytes.len) { const stop = @min(offset + 4096, bytes.len); const update_begin = nowNs(); - core.update(.{ .output = .{ .pane = 0, .bytes = bytes[offset..stop] } }); + core.update(.{ .output = .{ .pane = .at(0), .bytes = bytes[offset..stop] } }); pump(core); updates[nupdates] = nowNs() - update_begin; nupdates += 1; @@ -1001,7 +1001,7 @@ fn measureTerminalSession(io: std.Io, mib: usize, reps: usize, json: bool) !void var offset: usize = 0; while (offset < bytes.len) { const end = @min(offset + 4096, bytes.len); - core.update(.{ .output = .{ .pane = 0, .bytes = bytes[offset..end] } }); + core.update(.{ .output = .{ .pane = .at(0), .bytes = bytes[offset..end] } }); pump(core); offset = end; } @@ -1043,7 +1043,7 @@ fn measureTerminalSession(io: std.Io, mib: usize, reps: usize, json: bool) !void try checkTerminalTail(core, try core.render(arena.allocator()), batches - 1); core.update(.{ .key = .{ .cp = 'f', .text = "f" } }); const input = core.nextEffect() orelse return error.TerminalInputMissing; - if (input != .write or input.write.pane != 0 or !std.mem.eql(u8, "f", input.write.bytes.slice())) + if (input != .write or input.write.pane.index() != 0 or !std.mem.eql(u8, "f", input.write.bytes.slice())) return error.TerminalInputWrong; if (core.nextEffect() != null) return error.UnexpectedTerminalEffect; std.mem.sort(u64, samples[0..batches], {}, std.sort.asc(u64)); @@ -1063,7 +1063,7 @@ fn measureTerminalSession(io: std.Io, mib: usize, reps: usize, json: bool) !void const update = try std.fmt.bufPrint(&update_buffer, "\r\n\x1b[32mTURN {d:0>10} READY\x1b[0m", .{tail_id}); _ = arena.reset(.retain_capacity); const begin = nowNs(); - core.update(.{ .output = .{ .pane = 0, .bytes = update } }); + core.update(.{ .output = .{ .pane = .at(0), .bytes = update } }); pump(core); const cursor_row = @as(i32, @intCast(pardes.Term.grid(pane.terminal).offset)) + @as(i32, pardes.Term.grid(pane.terminal).cursor_y); pane.ovl.?.row = if (phase == 0) 0 else cursor_row - 1; |
