summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig23
1 files changed, 23 insertions, 0 deletions
diff --git a/build.zig b/build.zig
index 2f9d085d..7d380eb8 100644
--- a/build.zig
+++ b/build.zig
@@ -1205,6 +1205,29 @@ pub fn build(b: *std.Build) void {
run_perf.setCwd(b.path("."));
b.step("perf", "large-file / long-line latency table (-- [--json] [--reps N] [--base old.json])").dependOn(&run_perf.step);
+ // The filesystem scoreboard. Same shape as `perf` and for the same
+ // reason: it drives `acmefs.handle` through the real core, so it wants
+ // the core module rather than a second compilation of it, and
+ // ReleaseFast because a Debug run measures safety checks. It takes no
+ // mount point — there is no FUSE and no thread in it, which is exactly
+ // the claim the split makes and the thing worth measuring separately
+ // from the kernel's read/write/wake.
+ const fs_bench = b.addExecutable(.{
+ .name = "pardes-fs-bench",
+ .root_module = b.createModule(.{
+ .target = target,
+ .optimize = .ReleaseFast,
+ .root_source_file = b.path("test/fs_bench.zig"),
+ .link_libc = true,
+ }),
+ });
+ fs_bench.root_module.addImport("pardes", hx_core_mod);
+ b.installArtifact(fs_bench);
+ const run_fs_bench = b.addRunArtifact(fs_bench);
+ if (b.args) |args| run_fs_bench.addArgs(args);
+ run_fs_bench.setCwd(b.path("."));
+ b.step("fs-bench", "acme-fs per-request cost and allocation count (-- [--json] [--reps N])").dependOn(&run_fs_bench.step);
+
const unit_step = b.step("unit-test", "run native shell and module unit tests");
// Secure tempfile creation is native-shell IO, isolated from the core
// and tested as its own libc-linked module.