summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig20
1 files changed, 20 insertions, 0 deletions
diff --git a/build.zig b/build.zig
index d0730239..59eb6e87 100644
--- a/build.zig
+++ b/build.zig
@@ -670,6 +670,26 @@ pub fn build(b: *std.Build) void {
run_lspbench.setCwd(b.path("."));
b.step("lspbench", "language-backend latency + feature matrix (-- [--json] [repo-root])").dependOn(&run_lspbench.step);
+ // the editing scoreboard: one gesture, one file size, one number.
+ // ReleaseFast for the same reason lspbench is — a Debug build measures
+ // safety checks, and the question here is what the algorithm costs.
+ // Same core module again, so the `render` this times is the editor's.
+ const perf = b.addExecutable(.{
+ .name = "pardes-perf",
+ .root_module = b.createModule(.{
+ .target = target,
+ .optimize = .ReleaseFast,
+ .root_source_file = b.path("test/perf.zig"),
+ .link_libc = true,
+ }),
+ });
+ perf.root_module.addImport("pardes", hx_core_mod);
+ b.installArtifact(perf);
+ const run_perf = b.addRunArtifact(perf);
+ if (b.args) |args| run_perf.addArgs(args);
+ run_perf.setCwd(b.path("."));
+ b.step("perf", "large-file / long-line latency table (-- [--json] [--reps N] [--base old.json])").dependOn(&run_perf.step);
+
// modal.zig is pure std — its inline unit tests run here
const unit = b.addTest(.{ .root_module = b.createModule(.{
.target = target,