diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 20:25:28 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:17 -0300 |
| commit | 2b388888348860097967ae04d03f68c00a70472c (patch) | |
| tree | 5618cb0f5c50a62c58d748c2c80b0788bcf4ac46 /test/perf.zig | |
| parent | 7d2178022e721f3eac023f3e3be56c1bb1e49927 (diff) | |
| download | pardes-2b388888348860097967ae04d03f68c00a70472c.tar.gz pardes-2b388888348860097967ae04d03f68c00a70472c.zip | |
Mini.zig is mini.zig: a file of functions and no fields takes a namespace's lowercase name
The naming the split agreed on, deferred until now; panes.mini is its name at its importers. File.zig keeps its alias line (const Mini = panes.mini) so the file another agent is working in changes by that line alone. The served sources list and docs/design.typ name the new file. No behaviour changes; test/perf.zig's two references change, and since the perf harness is keyed by its own text, its three baselines are recorded again (under other agents' builds, so a little slower).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test/perf.zig')
| -rw-r--r-- | test/perf.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/perf.zig b/test/perf.zig index c639178f..38c640b4 100644 --- a/test/perf.zig +++ b/test/perf.zig @@ -1023,12 +1023,12 @@ const MiniMeasurement = struct { live_after_deinit: usize = 0, }; -fn checkMini(actual: pardes.panes.Mini.Result, expected: pardes.panes.Mini.Result) !void { +fn checkMini(actual: pardes.panes.mini.Result, expected: pardes.panes.mini.Result) !void { if (!std.mem.eql(u8, actual.content, expected.content) or !std.mem.eql(u8, actual.colors, expected.colors)) return error.MiniOutputMismatch; } -fn miniMeasurement(fallback: std.mem.Allocator, probe: MiniProbe, path: []const u8, source: []const u8, styles: []const u8, expected: pardes.panes.Mini.Result, reps: usize) !MiniMeasurement { +fn miniMeasurement(fallback: std.mem.Allocator, probe: MiniProbe, path: []const u8, source: []const u8, styles: []const u8, expected: pardes.panes.mini.Result, reps: usize) !MiniMeasurement { const samples = try gpa.alloc(u64, reps); defer gpa.free(samples); const allocators = pardes.memory.init(fallback); @@ -1059,7 +1059,7 @@ fn miniMeasurement(fallback: std.mem.Allocator, probe: MiniProbe, path: []const defer arena.deinit(); if (core) |p| { pump(p); - try pardes.panes.Mini.open(p, 0, path); + try pardes.panes.mini.open(p, 0, path); for (p.panes, 0..) |slot, id| if (slot != null and id != p.active) try p.removePane(id, null); pump(p); p.settings.colors = true; @@ -1095,7 +1095,7 @@ fn miniMeasurement(fallback: std.mem.Allocator, probe: MiniProbe, path: []const else styles; defer if (probe == .highlight_generate) syntax_allocator.free(highlighted); - const converted = try pardes.panes.Mini.generate(allocator, source, highlighted); + const converted = try pardes.panes.mini.generate(allocator, source, highlighted); const elapsed = nowNs() - begin; defer converted.deinit(allocator); if (index == 0) result.cold_ns = elapsed else samples[index - 1] = elapsed; @@ -1151,7 +1151,7 @@ fn measureMini(io: std.Io, fallback: std.mem.Allocator, reps: usize, json: bool) defer gpa.free(styles); if (styles.len != source.len or std.mem.indexOfScalar(u8, styles, @intFromEnum(pardes.syntax.Syn.comment)) == null) return error.MiniSyntaxUnavailable; - const expected = try pardes.panes.Mini.generate(gpa, source, styles); + const expected = try pardes.panes.mini.generate(gpa, source, styles); defer expected.deinit(gpa); if (expected.content.len == 0 or expected.content.len != expected.colors.len or !std.unicode.utf8ValidateSlice(expected.content)) return error.InvalidMiniOutput; |
