diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-15 18:52:46 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:14 -0300 |
| commit | 3f4f26e0e40d06427e72f72e760d01adcdc0326c (patch) | |
| tree | d4bd56c6bc97f27e7ca11f3ee646513a9e4b116d /build.zig | |
| parent | 02ea4db25f9802e76112f3b4e69aa75e5a9464dc (diff) | |
| download | pardes-3f4f26e0e40d06427e72f72e760d01adcdc0326c.tar.gz pardes-3f4f26e0e40d06427e72f72e760d01adcdc0326c.zip | |
Reuse bounded source analysis and speed up result context traversal
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -1009,6 +1009,23 @@ pub fn build(b: *std.Build) void { const lspprobe_step = b.step("lspprobe", "one language query against the real seam (-- <kind> <file> <line>:<col> [arg] [--reps N])"); lspprobe_step.dependOn(&run_lspprobe.step); + const locations_bench_step = b.step("locations-bench", "measure cold/warm result formatting (-Doptimize=ReleaseFast; CSV on stderr)"); + if (optimize != .ReleaseFast) { + locations_bench_step.dependOn(&b.addFail("locations-bench requires -Doptimize=ReleaseFast").step); + } else { + const locations_bench_module = b.createModule(.{ + .target = target, + .optimize = .ReleaseFast, + .root_source_file = b.path("test/locations_bench.zig"), + .link_libc = true, + }); + locations_bench_module.addImport("pardes", core_module); + const locations_bench = b.addTest(.{ .root_module = locations_bench_module, .filters = &.{"locations benchmark cold and warm formatting"} }); + const run_locations_bench = b.addRunArtifact(locations_bench); + run_locations_bench.has_side_effects = true; + locations_bench_step.dependOn(&run_locations_bench.step); + } + const perf_optimize: std.builtin.OptimizeMode = .ReleaseFast; const perf_options = b.addOptions(); const perf_target = std.Target.Query.fromTarget(&target.result); |
