Skip to documentation
SLOP

tiny.profiling.catalog

Reference tiny.profiling catalog

Defined in tiny.profiling.

API (51)

Actions

Public operations.

Types and contracts

Public types and contracts.

Values and defaults

Public values and defaults.

No direct callersNo direct callstiny.profilingcatalog
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Called byCallsNo direct callsanalyze.loadloadRuntest; no linksrc.profiling.catalogtest: profiling suite parser recogniz...optionsparseCycleArgsoptionsparsePlanArgsoptionsparseRunArgscatalog.Suiteparse
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callerscatalog.WorkloadpriorityComponentcatalog.WorkloadisAllocationPriority
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callscatalog.WorkloadisAllocationPrioritycatalog.WorkloadpriorityComponent
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callsprivate; no linksrc.profiling.analyze.compareworkloadThresholdbudgetevaluatetest; no linksrc.profiling.catalogtest: Chic family catalog installs in...test; no linksrc.profiling.catalogtest: Chic workload families pin the ...test; no linksrc.profiling.catalogtest: SAI profiling forwards workload...+30 morecatalogfind
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallstest; no linksrc.profiling.catalogtest: profiling catalog resolves run-...private; no linksrc.profiling.driver.fixture.dataresetTestPrepareddriver.prepareprepareWorkloadprivate; no linksrc.profiling.catalogdirectCwdprivate; no linksrc.profiling.catalogresolveArgumentsprivate; no linksrc.profiling.catalogresolveCommandprivate; no linksrc.profiling.catalogresolveEnvironmentprivate; no linksrc.profiling.catalogvalidateBinArguments+3 morecatalogresolveRuntime
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallscatalogresolveRuntimetest; no linksrc.profiling.catalogtest: profiling catalog bounds set an...test; no linksrc.profiling.catalogtest: profiling catalog rejects reset...catalogvalidateWorkloadexecuteenvironmentWithOverridesprivate; no linksrc.profiling.catalogvalidEnvironmentNamecatalogvalidateEnvironment
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallscatalogresolveRuntimetest; no linksrc.profiling.catalogtest: profiling catalog rejects reset...test; no linksrc.profiling.catalogtest: profiling catalog validates dir...private; no linksrc.profiling.catalogvalidateBinArgumentsprivate; no linksrc.profiling.catalogvalidateCommandcatalogvalidateEnvironmentprivate; no linksrc.profiling.catalogvalidatePackageBuildOptionscatalogvalidateWorkload
Static calls · unresolved targets: 0 · external targets: 0.

Source: src/profiling/catalog.zig

zig
const std = @import("std");const surface = @import("surface.zig");const substitution = @import("substitute.zig");pub const Suite = enum {    smoke,    standard,    all,    pub fn parse(value: []const u8) ?Suite {        if (std.mem.eql(u8, value, "smoke")) return .smoke;        if (std.mem.eql(u8, value, "standard")) return .standard;        if (std.mem.eql(u8, value, "all")) return .all;        return null;    }    pub fn name(self: Suite) []const u8 {        return @tagName(self);    }};pub const Tier = enum {    smoke,    standard,    expensive,};pub const Surface = enum {    benchmark,    profile,    attribution,    compile,};pub const AllocationCounterSupport = enum {    unknown,    unsupported,    supported,};pub const AllocationTracePolicy = enum {    unknown,    unsupported,    opt_in,    default_on,    pub fn supported(self: AllocationTracePolicy) bool {        return self == .opt_in or self == .default_on;    }};pub const AllocationBaselinePolicy = enum {    none,    previous_successful_run,};pub const AllocationBudget = union(AllocationBaselinePolicy) {    none,    previous_successful_run: f64,    pub fn policy(self: AllocationBudget) AllocationBaselinePolicy {        return std.meta.activeTag(self);    }    pub fn percent(self: AllocationBudget) ?f64 {        return switch (self) {            .none => null,            .previous_successful_run => |value| value,        };    }};pub const AllocationTracking = struct {    counters: AllocationCounterSupport = .unknown,    trace: AllocationTracePolicy = .unknown,    budget: AllocationBudget = .none,};pub const workload_root_token = "{workload_root}";pub const maximum_command_arguments: usize = 128;pub const maximum_command_bytes: usize = 16 * 1024;pub const maximum_environment_overrides: usize = 16;pub const maximum_environment_name_bytes: usize = 128;pub const maximum_environment_value_bytes: usize = 4096;pub const maximum_environment_bytes: usize = 16 * 1024;/// Matches the registry audit's bound on one keyed build surface.pub const maximum_package_build_options: usize = 8;pub const maximum_package_build_option_bytes: usize = 256;pub const Command = struct {    argv: []const []const u8,    cwd: ?[]const u8 = null,};pub const EnvironmentOverride = struct {    name: []const u8,    value: ?[]const u8 = null,    pub fn operation(self: EnvironmentOverride) []const u8 {        return if (self.value == null) "unset" else "set";    }};pub const Bin = struct {    step: []const u8 = "bench-bin",    path: []const u8,    args: []const []const u8 = &.{},    cwd: ?[]const u8 = null,    pub fn scope(self: Bin, package: []const u8) []const u8 {        return self.cwd orelse package;    }};pub const Workload = struct {    name: []const u8,    package: []const u8,    step: []const u8,    local_step: ?[]const u8 = null,    /// `-D` options that expose `local_step` in the package's own build.    /// Only package-scoped commands receive them; root commands never do.    package_build_options: []const []const u8 = &.{},    cwd: ?[]const u8 = null,    summary: []const u8,    tier: Tier,    surface: Surface,    bin: ?Bin = null,    prepare: ?Command = null,    reset: ?Command = null,    environment: []const EnvironmentOverride = &.{},    forwards_args: bool = false,    allocation_tracking: AllocationTracking = .{},    wall_threshold_percent: ?f64 = null,    rss_threshold_percent: ?f64 = null,    metric_threshold_percent: ?f64 = null,    priority_weight: f64 = 1,    priority_component: ?[]const u8 = null,    history_paths: []const []const u8 = &.{},    pub fn includedIn(self: Workload, suite: Suite) bool {        return switch (suite) {            .smoke => self.tier == .smoke,            .standard => self.tier != .expensive,            .all => true,        };    }    pub fn matches(self: Workload, value: []const u8) bool {        return std.mem.eql(u8, self.name, value) or std.mem.eql(u8, self.step, value);    }    pub fn localStep(self: Workload) []const u8 {        return self.local_step orelse self.step;    }    /// The package build options a command run from `scope` receives.    pub fn buildOptionsFor(self: Workload, scope: []const u8) []const []const u8 {        if (!std.mem.eql(u8, scope, self.package)) return &.{};        return self.package_build_options;    }    pub fn wallThresholdPercent(self: Workload, default: f64) f64 {        return self.wall_threshold_percent orelse default;    }    pub fn rssThresholdPercent(self: Workload, default: f64) f64 {        return self.rss_threshold_percent orelse default;    }    pub fn metricThresholdPercent(self: Workload, default: f64) f64 {        return self.metric_threshold_percent orelse default;    }    pub fn priorityWeight(self: Workload) f64 {        return self.priority_weight;    }    pub fn priorityComponent(self: Workload) []const u8 {        return self.priority_component orelse self.package;    }    pub fn supportsAllocationCounters(self: Workload) bool {        return self.allocation_tracking.counters == .supported;    }    pub fn allocationBaselinePolicy(self: Workload) AllocationBaselinePolicy {        return self.allocation_tracking.budget.policy();    }    pub fn allocationBudgetPercent(self: Workload) ?f64 {        return self.allocation_tracking.budget.percent();    }    pub fn supportsAllocationTrace(self: Workload) bool {        return self.allocation_tracking.trace.supported();    }    pub fn requiresDirectExecution(self: Workload) bool {        return self.prepare != null or self.reset != null or self.environment.len != 0;    }    pub fn tracesAllocationsByDefault(self: Workload) bool {        return self.allocation_tracking.trace == .default_on;    }    pub fn isAllocationPriority(self: Workload) bool {        return std.mem.eql(u8, self.priorityComponent(), "allocator");    }};pub const Runtime = struct {    workload_root: []const u8,    bin_args: []const []const u8,    prepare: ?Command,    reset: ?Command,    environment: []const EnvironmentOverride,};pub fn validateWorkload(workload: Workload) !void {    try validateCommand(workload.bin, workload.prepare, .prepare);    try validateCommand(workload.bin, workload.reset, .reset);    if (workload.environment.len != 0 and workload.bin == null) {        return error.EnvironmentRequiresDirectBinary;    }    if (workload.bin) |bin| try validateBinArguments(bin.args);    try validateEnvironment(workload.environment);    try validatePackageBuildOptions(workload.package_build_options);}fn validatePackageBuildOptions(options: []const []const u8) !void {    if (options.len > maximum_package_build_options) {        return error.TooManyPackageBuildOptions;    }    for (options, 0..) |option, index| {        try validateBoundedString(            option,            maximum_package_build_option_bytes,            error.InvalidPackageBuildOption,        );        if (!std.mem.startsWith(u8, option, "-D") or option.len == 2) {            return error.InvalidPackageBuildOption;        }        for (options[index + 1 ..]) |other| {            if (std.mem.eql(u8, option, other)) {                return error.DuplicatePackageBuildOption;            }        }    }}const CommandKind = enum {    prepare,    reset,};fn validateCommand(bin: ?Bin, optional: ?Command, kind: CommandKind) !void {    const command = optional orelse return;    if (bin == null) return switch (kind) {        .prepare => error.PrepareRequiresDirectBinary,        .reset => error.ResetRequiresDirectBinary,    };    if (command.argv.len == 0 or command.argv.len > maximum_command_arguments) {        return invalidCommand(kind);    }    var bytes: usize = 0;    for (command.argv) |argument| {        try validateBoundedString(argument, maximum_command_bytes, invalidCommand(kind));        bytes = std.math.add(usize, bytes, argument.len) catch            return commandTooLarge(kind);    }    if (command.cwd) |cwd| {        try validateBoundedString(cwd, maximum_command_bytes, invalidCommand(kind));        bytes = std.math.add(usize, bytes, cwd.len) catch            return commandTooLarge(kind);    }    if (bytes > maximum_command_bytes) return commandTooLarge(kind);}fn invalidCommand(kind: CommandKind) anyerror {    return switch (kind) {        .prepare => error.InvalidPrepareCommand,        .reset => error.InvalidResetCommand,    };}fn commandTooLarge(kind: CommandKind) anyerror {    return switch (kind) {        .prepare => error.PrepareCommandTooLarge,        .reset => error.ResetCommandTooLarge,    };}fn validateBinArguments(arguments: []const []const u8) !void {    if (arguments.len > maximum_command_arguments) return error.TooManyBinaryArguments;    var bytes: usize = 0;    for (arguments) |argument| {        try validateBoundedString(            argument,            maximum_command_bytes,            error.InvalidBinaryArgument,        );        bytes = std.math.add(usize, bytes, argument.len) catch            return error.BinaryArgumentsTooLarge;    }    if (bytes > maximum_command_bytes) return error.BinaryArgumentsTooLarge;}pub fn resolveRuntime(    allocator: std.mem.Allocator,    workload: Workload,    workload_root: []const u8,) !Runtime {    try validateWorkload(workload);    if (!std.fs.path.isAbsolute(workload_root)) return error.InvalidWorkloadRoot;    const replacements = [_]substitution.Replacement{.{        .token = workload_root_token,        .value = workload_root,    }};    const default_cwd = directCwd(workload);    const runtime = Runtime{        .workload_root = workload_root,        .bin_args = if (workload.bin) |bin|            try resolveArguments(allocator, bin.args, &replacements)        else            &.{},        .prepare = try resolveCommand(            allocator,            workload.prepare,            default_cwd,            &replacements,        ),        .reset = try resolveCommand(            allocator,            workload.reset,            default_cwd,            &replacements,        ),        .environment = try resolveEnvironment(            allocator,            workload.environment,            &replacements,        ),    };    try validateBinArguments(runtime.bin_args);    try validateCommand(workload.bin, runtime.prepare, .prepare);    try validateCommand(workload.bin, runtime.reset, .reset);    try validateEnvironment(runtime.environment);    return runtime;}fn directCwd(workload: Workload) ?[]const u8 {    const bin = workload.bin orelse return workload.cwd;    const scope = bin.scope(workload.package);    return if (std.mem.eql(u8, scope, ".")) null else scope;}fn resolveArguments(    allocator: std.mem.Allocator,    arguments: []const []const u8,    replacements: []const substitution.Replacement,) ![]const []const u8 {    const result = try allocator.alloc([]const u8, arguments.len);    for (arguments, 0..) |argument, index| {        result[index] = try resolveString(            allocator,            argument,            replacements,            maximum_command_bytes,        );    }    return result;}fn resolveCommand(    allocator: std.mem.Allocator,    optional: ?Command,    default_cwd: ?[]const u8,    replacements: []const substitution.Replacement,) !?Command {    const command = optional orelse return null;    const cwd_template = command.cwd orelse default_cwd;    return .{        .argv = try resolveArguments(allocator, command.argv, replacements),        .cwd = if (cwd_template) |cwd|            try resolveString(                allocator,                cwd,                replacements,                maximum_command_bytes,            )        else            null,    };}fn resolveEnvironment(    allocator: std.mem.Allocator,    environment: []const EnvironmentOverride,    replacements: []const substitution.Replacement,) ![]const EnvironmentOverride {    const result = try allocator.alloc(EnvironmentOverride, environment.len);    for (environment, 0..) |entry, index| {        result[index] = .{            .name = entry.name,            .value = if (entry.value) |value|                try resolveString(                    allocator,                    value,                    replacements,                    maximum_environment_value_bytes,                )            else                null,        };    }    return result;}fn resolveString(    allocator: std.mem.Allocator,    template: []const u8,    replacements: []const substitution.Replacement,    maximum_bytes: usize,) ![]const u8 {    return substitution.resolve(        allocator,        template,        replacements,        maximum_bytes,    ) catch |err| switch (err) {        error.InvalidResolvedString => error.InvalidResolvedWorkloadString,        else => |other| return other,    };}pub fn validateEnvironment(overrides: []const EnvironmentOverride) !void {    if (overrides.len > maximum_environment_overrides) {        return error.TooManyEnvironmentOverrides;    }    var bytes: usize = 0;    for (overrides, 0..) |left, left_index| {        if (!validEnvironmentName(left.name)) return error.InvalidEnvironmentName;        bytes = std.math.add(usize, bytes, left.name.len) catch            return error.EnvironmentOverridesTooLarge;        if (left.value) |value| {            if (value.len > maximum_environment_value_bytes or                std.mem.indexOfScalar(u8, value, 0) != null)            {                return error.InvalidEnvironmentValue;            }            bytes = std.math.add(usize, bytes, value.len) catch                return error.EnvironmentOverridesTooLarge;        }        for (overrides[left_index + 1 ..]) |right| {            if (std.mem.eql(u8, left.name, right.name)) {                return error.DuplicateEnvironmentOverride;            }        }    }    if (bytes > maximum_environment_bytes) return error.EnvironmentOverridesTooLarge;}fn validEnvironmentName(name: []const u8) bool {    if (name.len == 0 or name.len > maximum_environment_name_bytes) return false;    return std.mem.indexOfAny(u8, name, "=\x00") == null;}fn validateBoundedString(    value: []const u8,    maximum: usize,    invalid: anyerror,) !void {    if (value.len == 0 or value.len > maximum or        std.mem.indexOfScalar(u8, value, 0) != null)    {        return invalid;    }}const complete_workloads = [_]Workload{    .{ .name = "choir.compiler", .package = "lib/choir", .step = "choir-compiler-bench", .local_step = "bench", .summary = "Choir compiler cleanup benchmark", .tier = .smoke, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/choir-compiler-bench" }, .forwards_args = true },    .{ .name = "choir.order", .package = "lib/choir", .step = "choir-order-bench", .local_step = "order-bench", .summary = "Choir clustered insertion and dominance-query order-maintenance benchmark", .tier = .standard, .surface = .benchmark, .bin = .{ .step = "order-bench-bin", .path = "zig-out/bin/choir-order-bench" }, .priority_component = "compiler" },    .{ .name = "choir.wasm-emitter", .package = "lib/choir", .step = "choir-wasm-bench", .local_step = "wasm-bench", .summary = "Choir WebAssembly emitter benchmark", .tier = .standard, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/choir-compiler-bench", .args = &.{ "--suite", "wasm" } }, .forwards_args = true, .metric_threshold_percent = 20, .priority_component = "compiler" },    .{ .name = "choir.versus.compile", .package = "lib/choir", .step = "choir-versus-compile", .summary = "Choir versus compile-speed matrix", .tier = .smoke, .surface = .compile, .bin = .{ .step = "choir-versus-bench-bin", .path = "zig-out/bin/choir-versus-bench", .args = &.{ "run", "--compile-only", "--compile-matrix", "--samples", "5", "--warmup", "1", "--no-external", "--no-counters" } }, .metric_threshold_percent = 25, .priority_component = "compiler" },    .{ .name = "choir.versus", .package = "lib/choir", .step = "choir-versus-bench", .summary = "Choir versus runtime battery against reference C compilers", .tier = .expensive, .surface = .benchmark, .forwards_args = true, .priority_component = "compiler" },    .{ .name = "chant.versus", .package = "lib/chant", .step = "chant-versus-bench", .summary = "chant C frontend versus battery over the shared corpus oracle", .tier = .expensive, .surface = .benchmark, .forwards_args = true, .priority_component = "compiler" },    .{ .name = "chant.lexer", .package = "lib/chant", .step = "lexer-bench", .cwd = "lib/chant", .summary = "Chant lexer benchmark", .tier = .standard, .surface = .benchmark, .bin = .{ .step = "lexer-bench-bin", .path = "zig-out/bin/chant-lexer-bench" }, .priority_component = "compiler" },    .{ .name = "tldr.linker", .package = "lib/tldr", .step = "tldr-bench", .local_step = "bench", .package_build_options = &.{"-Dprofiling=true"}, .summary = "TLDR linker benchmarks", .tier = .standard, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/tldr-bench" } },    .{ .name = "tldr.external", .package = "lib/tldr", .step = "tldr-external-bench", .local_step = "external-bench", .package_build_options = &.{"-Dprofiling=true"}, .summary = "TLDR versus external linkers discovered on PATH", .tier = .expensive, .surface = .benchmark, .priority_component = "linker" },    .{ .name = "gpalloc.allocator", .package = "lib/gpalloc", .step = "gpalloc-bench", .local_step = "bench", .summary = "gpalloc allocator benchmarks", .tier = .smoke, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/gpalloc-bench" }, .allocation_tracking = .{ .counters = .supported, .trace = .opt_in, .budget = .{ .previous_successful_run = 30 } }, .metric_threshold_percent = 30, .priority_component = "allocator" },    .{ .name = "accy.choir", .package = "lib/accy", .step = "accy-choir-bench", .summary = "Accy Choir backend lowering benchmark", .tier = .standard, .surface = .benchmark, .bin = .{ .step = "accy-choir-bench-bin", .path = "zig-out/bin/accy-choir-pipeline-bench" }, .forwards_args = true, .history_paths = &.{"lib/choir"} },    .{ .name = "accy.cpu", .package = "lib/accy", .step = "accy-cpu-vector-bench", .summary = "Accy native CPU vectorization benchmark", .tier = .standard, .surface = .benchmark, .bin = .{ .step = "accy-cpu-vector-bench-bin", .path = "zig-out/bin/accy-cpu-vector-bench" }, .forwards_args = true },    .{ .name = "accy.versus", .package = "lib/accy", .step = "accy-versus-bench", .summary = "Accy CUDA versus battery against production-compiler baselines", .tier = .expensive, .surface = .benchmark, .forwards_args = true, .history_paths = &.{"lib/choir"} },    .{ .name = "accy.scan", .package = "lib/accy", .step = "accy-scan-bench", .summary = "Accy tensor scan-as-iterate versus hand-unrolled lowering", .tier = .expensive, .surface = .benchmark, .forwards_args = true },    .{ .name = "accy.wos", .package = "lib/accy", .step = "accy-wos-bench", .cwd = "lib/accy", .summary = "Accy Walk-on-Spheres fold-versus-while falsifier benchmark", .tier = .expensive, .surface = .benchmark },    .{ .name = "accy.reaction", .package = "lib/accy", .step = "accy-reaction-bench", .cwd = "lib/accy", .summary = "Accy Gray-Scott reaction-diffusion step benchmark and frame renderer", .tier = .expensive, .surface = .benchmark, .forwards_args = true },    .{ .name = "accy.sph", .package = "lib/accy", .step = "accy-sph-bench", .cwd = "lib/accy", .summary = "Accy SPH dam-break benchmark on grid and sort families", .tier = .expensive, .surface = .benchmark, .forwards_args = true },    .{ .name = "accy.einsum", .package = "lib/accy", .step = "accy-einsum-bench", .cwd = "lib/accy", .summary = "Accy einsum contraction planner benchmark", .tier = .expensive, .surface = .benchmark },    .{ .name = "accy.publication", .package = "lib/accy", .step = "accy-publication-bench", .cwd = "lib/accy", .summary = "Accy sealed stage publication against Fermi floors", .tier = .standard, .surface = .benchmark, .bin = .{ .step = "accy-publication-bench-bin", .path = "zig-out/bin/accy-publication-bench" }, .forwards_args = true, .history_paths = &.{"lib/choir"} },    .{ .name = "glom.search", .package = "tools/glom", .step = "glom-bench", .local_step = "bench", .summary = "glom profiling benchmarks", .tier = .smoke, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/glom-bench" } },    .{        .name = "glom.contention",        .package = "tools/glom",        .step = "glom-bench-contention",        .local_step = "bench-contention",        .summary = "Glom document contention, batching, busy admission, and durability matrix",        .tier = .standard,        .surface = .benchmark,        .bin = .{ .path = "zig-out/bin/glom-bench" },        .environment = &.{.{            .name = "BENCH_FILTER",            .value = "glom document contention",        }},        .allocation_tracking = .{            .counters = .supported,            .trace = .opt_in,            .budget = .{ .previous_successful_run = 15 },        },        .metric_threshold_percent = 10,        .priority_component = "storage",        .history_paths = &.{ "tools/glom/src/database", "tools/glom/src/profiling" },    },    .{        .name = "stardust.observer.startup",        .package = "tools/stardust",        .step = "stardust-bench",        .local_step = "bench",        .summary = "Observer startup allocation at lower and upper configuration ceilings",        .tier = .smoke,        .surface = .benchmark,        .bin = .{ .path = "zig-out/bin/stardust-bench" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "stardust.observer.startup" }},        .allocation_tracking = .{            .counters = .supported,            .trace = .opt_in,            .budget = .{ .previous_successful_run = 15 },        },        .history_paths = &.{ "tools/stardust/src/pipeline", "tools/stardust/src/profiling" },    },    .{        .name = "stardust.observer.document",        .package = "tools/stardust",        .step = "stardust-document-bench",        .local_step = "document-bench",        .summary = "Observer storage from WORKLOAD_ROOT/snapshot at both configuration ceilings",        .tier = .expensive,        .surface = .profile,        .bin = .{ .path = "zig-out/bin/stardust-bench" },        .environment = &.{            .{ .name = "BENCH_FILTER", .value = "stardust.observer.document" },            .{ .name = "STARDUST_BENCH_SNAPSHOT", .value = "{workload_root}/snapshot" },        },        .allocation_tracking = .{            .counters = .supported,            .trace = .opt_in,            .budget = .{ .previous_successful_run = 15 },        },        .history_paths = &.{            "tools/stardust/src/pipeline",  "tools/stardust/src/phase",            "tools/stardust/src/profiling",        },    },    .{        .name = "stardust.observer.cache",        .package = "tools/stardust",        .step = "stardust-cache-bench",        .local_step = "cache-bench",        .summary = "Cold and repeated summary cache preparation from WORKLOAD_ROOT/snapshot",        .tier = .expensive,        .surface = .profile,        .bin = .{ .path = "zig-out/bin/stardust-bench" },        .environment = &.{            .{ .name = "BENCH_FILTER", .value = "stardust.observer.cache" },            .{ .name = "STARDUST_BENCH_SNAPSHOT", .value = "{workload_root}/snapshot" },        },        .allocation_tracking = .{            .counters = .supported,            .trace = .opt_in,            .budget = .{ .previous_successful_run = 15 },        },        .history_paths = &.{            "tools/stardust/src/pipeline",  "tools/stardust/src/summary",            "tools/stardust/src/profiling",        },    },    .{ .name = "smg.graph", .package = "tools/smg", .step = "smg-bench", .local_step = "bench", .summary = "smg profiling benchmarks", .tier = .smoke, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/smg-bench" } },    .{        .name = "smg.production.about_missing",        .package = "tools/smg",        .step = "smg-production-about",        .local_step = "production-about",        .summary = "SMG missing-name resolution against an operator-provided production graph",        .tier = .expensive,        .surface = .profile,        .bin = .{ .step = "production-bench-bin", .path = "zig-out/bin/smg-production-bench" },        .environment = &.{            .{ .name = "BENCH_FILTER", .value = "smg.production.about_missing" },            .{ .name = "SMG_BENCH_STORE_DIR", .value = "{workload_root}" },        },        .allocation_tracking = .{ .trace = .opt_in },        .wall_threshold_percent = 20,        .rss_threshold_percent = 20,        .priority_component = "storage",        .history_paths = &.{ "tools/smg/src/storage", "tools/smg/src/name.zig", "lib/sql/src" },    },    .{        .name = "smg.production.overview",        .package = "tools/smg",        .step = "smg-production-overview",        .local_step = "production-overview",        .summary = "SMG graph load and overview analysis against an operator-provided production graph",        .tier = .expensive,        .surface = .profile,        .bin = .{ .step = "production-bench-bin", .path = "zig-out/bin/smg-production-bench" },        .environment = &.{            .{ .name = "BENCH_FILTER", .value = "smg.production.overview" },            .{ .name = "SMG_BENCH_STORE_DIR", .value = "{workload_root}" },        },        .allocation_tracking = .{ .trace = .opt_in },        .wall_threshold_percent = 20,        .rss_threshold_percent = 20,        .priority_component = "storage",        .history_paths = &.{ "tools/smg/src/storage", "tools/smg/src/analysis", "lib/sql/src" },    },    .{        .name = "web.slides.editor",        .package = "tools/web",        .step = "web-slides-editor-profile",        .cwd = "tools/web",        .summary = "Production-browser slide editor interactions and resident Typst rendering",        .tier = .expensive,        .surface = .profile,        .priority_component = "editor",        .history_paths = &.{            "lib/http",            "lib/sys",            "lib/zen",            "press/tools/figures",        },    },    .{        .name = "web.docs.publication",        .package = "tools/web",        .step = "web-docs-publication-profile",        .summary = "Full registered public API documentation publication",        .tier = .expensive,        .surface = .profile,        .bin = .{            .step = "web-docs-publication-profile-bin",            .path = "zig-out/bin/web-docs-publication-profile",            .args = &.{ "publish", "{workload_root}/publication" },            .cwd = ".",        },        .reset = .{ .argv = &.{            "zig-out/bin/web-docs-publication-profile",            "reset",            "{workload_root}/publication",        } },        .allocation_tracking = .{            .counters = .unsupported,            .trace = .unsupported,        },        .wall_threshold_percent = 20,        .rss_threshold_percent = 20,        .priority_component = "docs",        .history_paths = &.{            "build/docs",            "build/packages/registry",            "build/profiling.zig",            "press/web",            "src/profiling",        },    },    .{ .name = "profiling.ingest", .package = ".", .step = "profiling-ingest-bench", .summary = "bounded profiling artifact JSON classification", .tier = .smoke, .surface = .benchmark, .bin = .{ .step = "profiling-ingest-bench-bin", .path = "zig-out/bin/profiling-ingest-bench", .cwd = "." }, .metric_threshold_percent = 15, .priority_component = "profiling" },    .{        .name = "crumble.pcm16",        .package = "fun/crumble",        .step = "crumble-bench",        .local_step = "bench",        .summary = "Crumble PCM16 encode and decode benchmarks",        .tier = .standard,        .surface = .benchmark,        .bin = .{ .path = "zig-out/bin/crumble-bench" },        .metric_threshold_percent = 20,    },    .{        .name = "deflate.decode",        .package = "lib/deflate",        .step = "deflate-bench",        .local_step = "bench",        .summary = "DEFLATE whole-buffer zlib decode benchmarks",        .tier = .standard,        .surface = .benchmark,        .bin = .{ .path = "zig-out/bin/deflate-bench" },        .metric_threshold_percent = 20,    },    .{        .name = "png.pixels",        .package = "lib/png",        .step = "png-bench",        .local_step = "bench",        .summary = "PNG pixel planning, encoding, and decoding benchmarks",        .tier = .standard,        .surface = .benchmark,        .bin = .{ .path = "zig-out/bin/png-bench" },        .metric_threshold_percent = 20,    },    .{ .name = "forum.search", .package = "tools/forum", .step = "forum-bench", .local_step = "bench", .summary = "forum profiling benchmarks", .tier = .standard, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/forum-bench" } },    .{ .name = "peek.animation", .package = "tools/peek", .step = "peek-bench", .local_step = "bench", .summary = "peek animation draw benchmarks", .tier = .standard, .surface = .benchmark, .bin = .{ .step = "bench-bin", .path = "zig-out/bin/peek-bench" }, .metric_threshold_percent = 15 },    .{ .name = "browser.parse", .package = "lib/browser", .step = "browser-bench", .local_step = "bench", .summary = "lib/browser parse benchmarks", .tier = .standard, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/browser-bench" } },    .{ .name = "bumpalo.allocator", .package = "lib/bumpalo", .step = "bumpalo-bench", .local_step = "bench", .summary = "lib/bumpalo allocator benchmarks", .tier = .smoke, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/bumpalo-bench" }, .allocation_tracking = .{ .counters = .supported, .trace = .default_on, .budget = .{ .previous_successful_run = 25 } }, .metric_threshold_percent = 25, .priority_component = "allocator" },    .{ .name = "bumpalo.profile", .package = "lib/bumpalo", .step = "bumpalo-profile", .local_step = "profile", .summary = "lib/bumpalo profiling workloads", .tier = .expensive, .surface = .profile },    .{        .name = "chic.bench",        .package = "lib/chic",        .step = "chic-bench",        .local_step = "bench",        .summary = "Limit witnesses pass before nine recorded scales in ReleaseFast " ++            "use median nanoseconds " ++            "and 10% thresholds; issue:tiny-8qh815kn targets zero warmed allocations",        .tier = .standard,        .surface = .benchmark,        .bin = .{ .path = "zig-out/bin/chic-bench" },        .wall_threshold_percent = 10,        .rss_threshold_percent = 10,        .metric_threshold_percent = 10,        .priority_component = "kernel",        .history_paths = &.{            "lib/chic/src/history",            "lib/chic/src/reactor",            "lib/chic/src/machine",            "lib/chic/src/profiling/workloads",            "lib/chic/src/language/engine/native",        },    },    .{        .name = "chic.profile",        .package = "lib/chic",        .step = "chic-profile",        .local_step = "profile",        .summary = "Limit witnesses pass before nine single executions in ReleaseFast " ++            "use wall nanoseconds " ++            "and 10% thresholds; issue:tiny-8qh815kn targets zero warmed allocations",        .tier = .expensive,        .surface = .profile,        .wall_threshold_percent = 10,        .rss_threshold_percent = 10,        .metric_threshold_percent = 10,        .priority_component = "kernel",        .history_paths = &.{            "lib/chic/src/history",            "lib/chic/src/reactor",            "lib/chic/src/machine",            "lib/chic/src/profiling/workloads",            "lib/chic/src/language/engine/native",        },    },    .{        .name = "chic.compilation",        .package = "lib/chic",        .step = "compilation-bench",        .cwd = "lib/chic",        .summary = "Paired ReleaseFast private and retained kernel banks compare " ++            "cold setup, repeated source compilation and complete evaluation",        .tier = .expensive,        .surface = .profile,        .bin = .{ .step = "compilation-bin", .path = "zig-out/bin/chic-compilation" },        .allocation_tracking = .{ .counters = .unsupported },        .history_paths = &.{            "lib/chic/src/language/eval/program",            "lib/chic/src/language/engine",            "lib/chic/src/host/daemon/compiler.zig",            "lib/chic/src/profiling/workloads/compilation.zig",        },    },    .{        .name = "chic.invocation",        .package = "lib/chic",        .step = "invocation-bench",        .cwd = "lib/chic",        .summary = "Paired ReleaseFast direct admission and application-spine calls " ++            "emit ordered samples for two result shapes at four argument counts",        .tier = .expensive,        .surface = .profile,        .bin = .{ .step = "invocation-bin", .path = "zig-out/bin/chic-invocation" },        .allocation_tracking = .{ .counters = .unsupported },        .history_paths = &.{            "lib/chic/src/language/eval/program",            "lib/chic/src/language/engine",            "lib/chic/src/profiling/workloads/invocation.zig",        },    },    .{        .name = "chic.start",        .package = "lib/chic",        .step = "start-profile",        .cwd = "lib/chic",        .summary = "Chic check start latency over the start and journey workload " ++            "programs for the configured and ReleaseFast executables",        .tier = .expensive,        .surface = .profile,    },    .{        .name = "chic.engine",        .package = "lib/chic",        .step = "chic-engine",        .cwd = "lib/chic",        .summary = "Limit witnesses pass before existing engine rows in ReleaseFast record " ++            "median nanoseconds with preserved sample counts and allocation observations. " ++            "Register dispatch compares instructions_per_step before cycles_per_step. " ++            "A cycles-only move is placement until instructions move too. " ++            "See lib/chic/src/profiling/README.md, Register dispatch interpretation",        .tier = .smoke,        .surface = .benchmark,        .bin = .{ .step = "bench-engine-bin", .path = "zig-out/bin/chic-bench-engine" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "chic engine" }},        .allocation_tracking = .{            .counters = .supported,            .trace = .default_on,            .budget = .{ .previous_successful_run = 10 },        },        .wall_threshold_percent = 10,        .rss_threshold_percent = 10,        .metric_threshold_percent = 10,        .priority_component = "engine",        .history_paths = &.{"lib/chic/src/profiling/workloads/engine.zig"},    },    .{        .name = "chic.host",        .package = "lib/chic",        .step = "chic-host",        .cwd = "lib/chic",        .summary = "Limit witnesses pass before existing host rows in ReleaseFast record " ++            "median nanoseconds with preserved sample counts and allocation observations",        .tier = .smoke,        .surface = .benchmark,        .bin = .{ .step = "bench-presence-bin", .path = "zig-out/bin/chic-bench-presence" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "chic presence host turn" }},        .allocation_tracking = .{            .counters = .supported,            .trace = .default_on,            .budget = .{ .previous_successful_run = 10 },        },        .wall_threshold_percent = 10,        .rss_threshold_percent = 10,        .metric_threshold_percent = 10,        .priority_component = "host",        .history_paths = &.{"lib/chic/src/profiling/workloads/host.zig"},    },    .{        .name = "chic.turn",        .package = "lib/chic",        .step = "chic-turn",        .cwd = "lib/chic",        .summary = "Limit witnesses pass before 64 reactor turns in ReleaseFast record " ++            "minimum, median nanoseconds, maximum, and count with 10% thresholds; " ++            "issue:tiny-8qh815kn targets zero warmed allocations",        .tier = .standard,        .surface = .benchmark,        .bin = .{ .step = "bench-turn-bin", .path = "zig-out/bin/chic-bench-turn" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "chic turn" }},        .allocation_tracking = .{            .counters = .supported,            .trace = .default_on,            .budget = .{ .previous_successful_run = 10 },        },        .wall_threshold_percent = 10,        .rss_threshold_percent = 10,        .metric_threshold_percent = 10,        .priority_component = "reactor",        .history_paths = &.{            "lib/chic/src/properties/machine",            "lib/chic/src/profiling/workloads/turn.zig",            "lib/chic/src/reactor",        },    },    .{        .name = "chic.lifecycle",        .package = "lib/chic",        .step = "chic-lifecycle",        .cwd = "lib/chic",        .summary = "Limit witnesses pass before activation, lifecycle constituents, and driver " ++            "restart in ReleaseFast record median nanoseconds from 64 fixed-storage samples; " ++            "zero allocations and explicit recovery/publication boundaries are required; " ++            "issue:tiny-7mvyiag5 owns the timing gaps",        .tier = .standard,        .surface = .benchmark,        .bin = .{ .step = "bench-lifecycle-bin", .path = "zig-out/bin/chic-bench-lifecycle" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "chic lifecycle" }},        .allocation_tracking = .{            .counters = .supported,            .trace = .default_on,            .budget = .{ .previous_successful_run = 10 },        },        .wall_threshold_percent = 10,        .rss_threshold_percent = 10,        .metric_threshold_percent = 10,        .priority_component = "kernel",        .history_paths = &.{            "lib/chic/src/history",            "lib/chic/src/reactor",            "lib/chic/src/profiling/workloads",        },    },    .{        .name = "chic.presence",        .package = "lib/chic",        .step = "chic-presence",        .cwd = "lib/chic",        .summary = "Limit witnesses pass before 512 generated inputs in ReleaseFast " ++            "use median nanoseconds " ++            "and 10% thresholds; warmed execution requires zero allocations",        .tier = .standard,        .surface = .benchmark,        .bin = .{ .step = "bench-presence-bin", .path = "zig-out/bin/chic-bench-presence" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "chic presence" }},        .allocation_tracking = .{            .counters = .supported,            .trace = .default_on,            .budget = .{ .previous_successful_run = 10 },        },        .wall_threshold_percent = 10,        .rss_threshold_percent = 10,        .metric_threshold_percent = 10,        .priority_component = "machine",        .history_paths = &.{            "lib/chic/src/machine",            "lib/chic/src/profiling/workloads",        },    },    .{        .name = "chic.authority",        .package = "lib/chic",        .step = "chic-authority",        .cwd = "lib/chic",        .summary = "Limit witnesses pass before 512 generated inputs in ReleaseFast " ++            "use median nanoseconds " ++            "and 10% thresholds; warmed execution requires zero allocations",        .tier = .standard,        .surface = .benchmark,        .bin = .{ .step = "bench-authority-bin", .path = "zig-out/bin/chic-bench-authority" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "chic authority" }},        .allocation_tracking = .{            .counters = .supported,            .trace = .default_on,            .budget = .{ .previous_successful_run = 10 },        },        .wall_threshold_percent = 10,        .rss_threshold_percent = 10,        .metric_threshold_percent = 10,        .priority_component = "machine",        .history_paths = &.{            "lib/chic/src/machine",            "lib/chic/src/profiling/workloads",        },    },    .{        .name = "chic.journal",        .package = "lib/chic",        .step = "chic-journal",        .cwd = "lib/chic",        .summary = "Limit witnesses pass before 256 appends and scans in ReleaseFast " ++            "use median nanoseconds " ++            "and 10% thresholds; issue:tiny-8qh815kn targets zero warmed allocations",        .tier = .standard,        .surface = .benchmark,        .bin = .{ .step = "bench-journal-bin", .path = "zig-out/bin/chic-bench-journal" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "chic journal" }},        .allocation_tracking = .{            .counters = .supported,            .trace = .default_on,            .budget = .{ .previous_successful_run = 10 },        },        .wall_threshold_percent = 10,        .rss_threshold_percent = 10,        .metric_threshold_percent = 10,        .priority_component = "kernel",        .history_paths = &.{            "lib/chic/src/history",            "lib/chic/src/reactor",            "lib/chic/src/profiling/workloads",        },    },    .{        .name = "chic.recovery",        .package = "lib/chic",        .step = "chic-recovery",        .cwd = "lib/chic",        .summary = "Limit witnesses pass before 64 checkpointed and 192 replayed " ++            "events in ReleaseFast use " ++            "median nanoseconds and 10% thresholds; " ++            "issue:tiny-8qh815kn targets zero warmed allocations",        .tier = .standard,        .surface = .benchmark,        .bin = .{ .step = "bench-recovery-bin", .path = "zig-out/bin/chic-bench-recovery" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "chic recovery" }},        .allocation_tracking = .{            .counters = .supported,            .trace = .default_on,            .budget = .{ .previous_successful_run = 10 },        },        .wall_threshold_percent = 10,        .rss_threshold_percent = 10,        .metric_threshold_percent = 10,        .priority_component = "kernel",        .history_paths = &.{            "lib/chic/src/history",            "lib/chic/src/reactor",            "lib/chic/src/profiling/workloads",        },    },    .{        .name = "chic.dispatch",        .package = "lib/chic",        .step = "chic-dispatch",        .cwd = "lib/chic",        .summary = "Limit witnesses pass before 512 generated inputs in ReleaseFast " ++            "use median nanoseconds " ++            "and 10% thresholds; warmed execution requires zero allocations",        .tier = .standard,        .surface = .benchmark,        .bin = .{ .step = "bench-dispatch-bin", .path = "zig-out/bin/chic-bench-dispatch" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "chic dispatch" }},        .allocation_tracking = .{            .counters = .supported,            .trace = .default_on,            .budget = .{ .previous_successful_run = 10 },        },        .wall_threshold_percent = 10,        .rss_threshold_percent = 10,        .metric_threshold_percent = 10,        .priority_component = "machine",        .history_paths = &.{            "lib/chic/src/machine",            "lib/chic/src/profiling/workloads",        },    },    .{        .name = "chic.realm_isolation",        .package = "lib/chic",        .step = "chic-realm-isolation",        .cwd = "lib/chic",        .summary = "Limit witnesses pass before two realms and 64 turns each in " ++            "ReleaseFast use median nanoseconds " ++            "and 10% thresholds; issue:tiny-8qh815kn targets zero warmed allocations",        .tier = .standard,        .surface = .benchmark,        .bin = .{ .step = "bench-realm-isolation-bin", .path = "zig-out/bin/chic-bench-realm-isolation" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "chic realm_isolation" }},        .allocation_tracking = .{            .counters = .supported,            .trace = .default_on,            .budget = .{ .previous_successful_run = 10 },        },        .wall_threshold_percent = 10,        .rss_threshold_percent = 10,        .metric_threshold_percent = 10,        .priority_component = "kernel",        .history_paths = &.{            "lib/chic/src/history",            "lib/chic/src/reactor",            "lib/chic/src/profiling/workloads",        },    },    .{        .name = "chic.overload",        .package = "lib/chic",        .step = "chic-overload",        .cwd = "lib/chic",        .summary = "Limit witnesses pass before 65 candidates, one refused commit, " ++            "192 MiB plus one byte, and " ++            "33 facets in ReleaseFast use median nanoseconds and 10% thresholds; " ++            "issue:tiny-8qh815kn targets zero warmed allocations",        .tier = .standard,        .surface = .benchmark,        .bin = .{ .step = "bench-overload-bin", .path = "zig-out/bin/chic-bench-overload" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "chic overload" }},        .allocation_tracking = .{            .counters = .supported,            .trace = .default_on,            .budget = .{ .previous_successful_run = 10 },        },        .wall_threshold_percent = 10,        .rss_threshold_percent = 10,        .metric_threshold_percent = 10,        .priority_component = "kernel",        .history_paths = &.{            "lib/chic/src/history",            "lib/chic/src/reactor",            "lib/chic/src/profiling/workloads",        },    },    .{        .name = "chic.facet",        .package = "lib/chic",        .step = "chic-facet",        .cwd = "lib/chic",        .summary = "Nine maximum Facet rows measure bind, fingerprint, refuse, react, checkpoint, " ++            "exhaust, history_read, propose, and replay_select with pinned floors and zero allocations",        .tier = .standard,        .surface = .benchmark,        .bin = .{ .step = "bench-facet-bin", .path = "zig-out/bin/chic-bench-facet" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "chic facet" }},        .allocation_tracking = .{ .counters = .supported, .trace = .default_on, .budget = .{ .previous_successful_run = 10 } },        .wall_threshold_percent = 10,        .rss_threshold_percent = 10,        .metric_threshold_percent = 10,        .priority_component = "facet",        .history_paths = &.{ "lib/chic/src/facet", "lib/chic/src/profiling/workloads/facet.zig" },    },    .{ .name = "filigree.shape", .package = "lib/filigree", .step = "filigree-bench", .local_step = "bench", .summary = "lib/filigree shaping benchmarks", .tier = .standard, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/filigree-bench" } },    .{ .name = "gpalloc.external", .package = "lib/gpalloc", .step = "gpalloc-external-bench", .local_step = "external-bench", .summary = "lib/gpalloc external mimalloc-bench runner", .tier = .expensive, .surface = .compile },    .{ .name = "gpalloc.driver", .package = "lib/gpalloc", .step = "bench-driver", .cwd = "lib/gpalloc", .summary = "standalone gpalloc benchmark driver", .tier = .expensive, .surface = .compile },    .{ .name = "gpalloc.compare", .package = "lib/gpalloc", .step = "bench-compare", .cwd = "lib/gpalloc", .summary = "standalone gpalloc benchmark driver comparison", .tier = .expensive, .surface = .benchmark, .bin = .{ .step = "bench-driver", .path = "zig-out/bin/gpalloc-bench-driver", .args = &.{"--allocator-stats"} }, .forwards_args = true, .allocation_tracking = .{ .counters = .supported, .trace = .opt_in, .budget = .{ .previous_successful_run = 30 } }, .metric_threshold_percent = 30, .priority_component = "allocator" },    .{ .name = "gui.paint", .package = "lib/gui", .step = "gui-bench", .local_step = "bench", .summary = "lib/gui native paint benchmarks", .tier = .standard, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/gui-bench" }, .metric_threshold_percent = 15 },    .{ .name = "http.parser", .package = "lib/http", .step = "http-bench", .local_step = "bench", .summary = "lib/http parser and serialization benchmarks", .tier = .standard, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/http-bench" } },    .{ .name = "isa.decode", .package = "lib/isa", .step = "isa-bench", .local_step = "bench", .summary = "ISA compiler/K0-shaped instruction decoding", .tier = .standard, .surface = .benchmark, .bin = .{ .step = "bench-bin", .path = "zig-out/bin/isa-bench" } },    .{        .name = "machine.native",        .package = "lib/machine",        .step = "machine-bench-native",        .local_step = "bench-native",        .summary = "Machine lifecycle native host lower-bound distributions",        .tier = .standard,        .surface = .benchmark,        .bin = .{            .step = "bench-bin",            .path = "zig-out/bin/machine-bench",        },        .environment = &.{.{            .name = "TINY_MACHINE_PROFILE_LANE",            .value = "native",        }},        .allocation_tracking = .{            .counters = .unsupported,            .trace = .unsupported,        },        .priority_component = "machine",        .history_paths = &.{ "lib/bench", "lib/coz", "lib/os", "lib/sys" },    },    .{        .name = "machine.kvm",        .package = "lib/machine",        .step = "machine-bench-kvm",        .local_step = "bench-kvm",        .summary = "Machine lifecycle KVM backend distributions",        .tier = .standard,        .surface = .benchmark,        .bin = .{            .step = "bench-bin",            .path = "zig-out/bin/machine-bench",        },        .environment = &.{.{            .name = "TINY_MACHINE_PROFILE_LANE",            .value = "kvm",        }},        .allocation_tracking = .{            .counters = .unsupported,            .trace = .unsupported,        },        .priority_component = "machine",        .history_paths = &.{ "lib/bench", "lib/coz", "lib/os", "lib/sys" },    },    .{        .name = "machine.reference",        .package = "lib/machine",        .step = "machine-bench-reference",        .local_step = "bench-reference",        .summary = "Machine lifecycle reference interpreter distributions",        .tier = .standard,        .surface = .benchmark,        .bin = .{            .step = "bench-bin",            .path = "zig-out/bin/machine-bench",        },        .environment = &.{.{            .name = "TINY_MACHINE_PROFILE_LANE",            .value = "reference",        }},        .allocation_tracking = .{            .counters = .unsupported,            .trace = .unsupported,        },        .priority_component = "machine",        .history_paths = &.{            "lib/bench",            "lib/coz",            "lib/isa",            "lib/os",            "lib/sys",        },    },    .{ .name = "mprompt.smoke", .package = "lib/mprompt", .step = "mprompt-bench", .local_step = "bench", .summary = "lib/mprompt benchmark smoke workload", .tier = .smoke, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/mprompt-bench", .args = &.{ "--workers", "128", "--requests", "5000", "--stack-kb", "16" } } },    .{ .name = "mprompt.effect", .package = "lib/mprompt", .step = "effect-bench", .cwd = "lib/mprompt", .summary = "mpeff effect benchmark", .tier = .expensive, .surface = .benchmark },    .{ .name = "mprompt.profile", .package = "lib/mprompt", .step = "mprompt-profile", .local_step = "profile", .summary = "larger lib/mprompt profiling workload", .tier = .expensive, .surface = .profile },    .{ .name = "mprompt.effect.profile", .package = "lib/mprompt", .step = "effect-profile", .cwd = "lib/mprompt", .summary = "larger mpeff effect profiling workload", .tier = .expensive, .surface = .profile },    .{ .name = "mprompt.reference", .package = "lib/mprompt", .step = "mprompt-reference", .summary = "release-sized lib/mprompt reference workloads", .tier = .expensive, .surface = .profile },    .{ .name = "pluck.internal", .package = "lib/pluck", .step = "bench", .cwd = "lib/pluck", .summary = "lib/pluck internal benchmarks", .tier = .standard, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/pluck-bench" } },    .{ .name = "python.collections", .package = "lib/python", .step = "python-bench", .local_step = "bench", .summary = "lib/python list and dictionary scale benchmarks", .tier = .standard, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/python-bench" }, .metric_threshold_percent = 20, .priority_component = "runtime" },    .{ .name = "pretty.layout", .package = "lib/pretty", .step = "pretty-bench", .summary = "lib/pretty document layout benchmarks", .tier = .smoke, .surface = .benchmark, .bin = .{ .step = "pretty-bench-bin", .path = "zig-out/bin/pretty-bench", .cwd = "." }, .metric_threshold_percent = 25, .priority_component = "output" },    .{ .name = "hypothesis.engine", .package = "lib/hypothesis", .step = "hypothesis-bench", .summary = "lib/hypothesis shrinker and draw benchmarks", .tier = .smoke, .surface = .benchmark, .bin = .{ .step = "hypothesis-bench-bin", .path = "zig-out/bin/hypothesis-bench", .cwd = "." }, .metric_threshold_percent = 25, .priority_component = "testing" },    .{        .name = "sys.boundary",        .package = "lib/sys",        .step = "sys-bench",        .summary = "lib/sys event and network boundary benchmarks",        .tier = .smoke,        .surface = .benchmark,        .bin = .{            .step = "sys-bench-bin",            .path = "zig-out/bin/sys-bench",            .cwd = ".",        },        .metric_threshold_percent = 20,        .priority_component = "runtime",    },    .{ .name = "bench.stabilizer", .package = "lib/bench", .step = "bench-stabilizer-bench", .local_step = "stabilizer-bench", .summary = "Stabilizer million-allocation pointer-validation benchmark", .tier = .expensive, .surface = .benchmark, .bin = .{ .step = "stabilizer-bench-bin", .path = "zig-out/bin/bench-stabilizer" }, .allocation_tracking = .{ .counters = .supported, .trace = .opt_in, .budget = .{ .previous_successful_run = 10 } }, .metric_threshold_percent = 10, .priority_component = "allocator", .history_paths = &.{"lib/stabilizer"} },    .{ .name = "markdown.inline", .package = "lib/markdown", .step = "markdown-bench", .local_step = "bench", .summary = "lib/markdown inline parser allocation-shape benchmarks", .tier = .smoke, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/markdown-bench" }, .metric_threshold_percent = 20, .priority_component = "text" },    .{ .name = "memtrace.record", .package = "lib/memtrace", .step = "memtrace-record-bench", .summary = "lib/memtrace allocation recording benchmarks", .tier = .smoke, .surface = .benchmark, .bin = .{ .step = "memtrace-record-bench-bin", .path = "zig-out/bin/memtrace-record-bench", .cwd = "." }, .allocation_tracking = .{ .counters = .supported, .trace = .opt_in, .budget = .{ .previous_successful_run = 20 } }, .metric_threshold_percent = 20, .priority_component = "allocator" },    .{ .name = "memtrace.replay", .package = "lib/memtrace", .step = "memtrace-replay-bench", .summary = "lib/memtrace event replay benchmarks", .tier = .smoke, .surface = .benchmark, .bin = .{ .step = "memtrace-replay-bench-bin", .path = "zig-out/bin/memtrace-replay-bench", .cwd = "." }, .allocation_tracking = .{ .counters = .supported, .trace = .opt_in, .budget = .{ .previous_successful_run = 20 } }, .metric_threshold_percent = 20, .priority_component = "allocator" },    .{ .name = "sandbox.staging", .package = "lib/sandbox", .step = "sandbox-bench", .local_step = "bench", .summary = "lib/sandbox staging benchmarks", .tier = .standard, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/sandbox-bench" } },    .{ .name = "qed.protocol", .package = "research/qed", .step = "qed-protocol-bench", .local_step = "protocol-bench", .summary = "QED actual compiler protocol with exact edit and native witnesses", .tier = .expensive, .surface = .benchmark, .bin = .{ .step = "qed-protocol-bench-bin", .path = "zig-out/research/qed/bin/qed-protocol-bench", .cwd = "." }, .forwards_args = true, .priority_component = "compiler", .allocation_tracking = .{ .counters = .unsupported, .trace = .unsupported } },    .{ .name = "sai.stage", .package = "research/sai", .step = "sai-bench", .local_step = "bench", .summary = "research/sai staged abstract interpreter benchmarks", .tier = .standard, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/sai-bench" }, .forwards_args = true },    .{ .name = "sdfii.validation", .package = "fun/sdfii", .step = "sdfii-bench", .local_step = "bench", .summary = "benchmark-shaped fun/sdfii validation tests", .tier = .expensive, .surface = .benchmark, .forwards_args = true, .metric_threshold_percent = 20 },    .{ .name = "sdfii.compile", .package = "fun/sdfii", .step = "sdfii-bench-compile", .local_step = "bench-compile", .summary = "fun/sdfii benchmark-shaped compile coverage", .tier = .expensive, .surface = .compile, .forwards_args = true },    .{ .name = "sdfii.subsystems", .package = "fun/sdfii", .step = "sdfii-bench-subsystems", .local_step = "bench-subsystems", .summary = "SDFII subsystem benchmark coverage suite", .tier = .expensive, .surface = .benchmark, .forwards_args = true },    .{ .name = "sdfii.timing", .package = "fun/sdfii", .step = "sdfii-bench-timing-pairs", .local_step = "bench-timing-pairs", .summary = "SDFII timing disabled/enabled benchmark pairs", .tier = .expensive, .surface = .attribution, .forwards_args = true },    .{ .name = "sdfii.field.sampling", .package = "fun/sdfii", .step = "bench-field-sampling", .cwd = "fun/sdfii", .summary = "SDFII CPU versus GPU distance-sampling benchmark", .tier = .expensive, .surface = .benchmark, .forwards_args = true },    .{ .name = "sdfii.field.march", .package = "fun/sdfii", .step = "bench-field-march", .cwd = "fun/sdfii", .summary = "SDFII CPU versus GPU frame-march benchmark", .tier = .expensive, .surface = .benchmark, .forwards_args = true },    .{ .name = "sdfii.field.composed", .package = "fun/sdfii", .step = "bench-field-composed", .cwd = "fun/sdfii", .summary = "SDFII composed-shape tape overhead benchmark", .tier = .expensive, .surface = .benchmark, .forwards_args = true },    .{ .name = "sdfii.field.march4k", .package = "fun/sdfii", .step = "bench-field-march-4k", .cwd = "fun/sdfii", .summary = "SDFII 4K Accy frame-march stress benchmark", .tier = .expensive, .surface = .benchmark, .forwards_args = true },    .{ .name = "sdfii.cross.engine", .package = "fun/sdfii", .step = "bench-cross-engine", .cwd = "fun/sdfii", .summary = "cross-engine benchmark harness", .tier = .expensive, .surface = .compile, .forwards_args = true },    .{ .name = "sdfii.transform.churn.pair", .package = "fun/sdfii", .step = "bench-transform-churn-stage-pair", .cwd = "fun/sdfii", .summary = "transform churn stage benchmark with timing disabled and enabled", .tier = .expensive, .surface = .attribution, .forwards_args = true },    .{ .name = "sdfii.transform.churn", .package = "fun/sdfii", .step = "bench-transform-churn-stage", .cwd = "fun/sdfii", .summary = "W2 transform-churn stage breakdown benchmark", .tier = .expensive, .surface = .benchmark, .forwards_args = true },    .{ .name = "sdfii.scene.pair", .package = "fun/sdfii", .step = "bench-scene-stage-pair", .cwd = "fun/sdfii", .summary = "scene stage benchmark with timing disabled and enabled", .tier = .expensive, .surface = .attribution, .forwards_args = true },    .{ .name = "sdfii.scene.stage", .package = "fun/sdfii", .step = "bench-scene-stage", .cwd = "fun/sdfii", .summary = "shaped scene traversal/render stage breakdown benchmark", .tier = .expensive, .surface = .benchmark, .forwards_args = true },    .{ .name = "sdfii.frame.pipeline", .package = "fun/sdfii", .step = "bench-frame-pipeline", .cwd = "fun/sdfii", .summary = "SDFII frame latency and throughput report", .tier = .expensive, .surface = .benchmark, .forwards_args = true },    .{ .name = "sdfii.frame.pipeline4k", .package = "fun/sdfii", .step = "bench-frame-pipeline-4k", .cwd = "fun/sdfii", .summary = "SDFII 4K Accy frame latency and throughput report", .tier = .expensive, .surface = .benchmark, .forwards_args = true },    .{ .name = "sdfii.frame.report", .package = "fun/sdfii", .step = "bench-frame-pipeline-report", .cwd = "fun/sdfii", .summary = "budgeted SDFII frame latency and throughput JSONL report", .tier = .expensive, .surface = .profile, .forwards_args = true },    .{ .name = "sdfii.landscape", .package = "fun/sdfii", .step = "bench-landscape", .cwd = "fun/sdfii", .summary = "SDFII mathematical landscape frame distributions", .tier = .expensive, .surface = .benchmark },    .{ .name = "sdfii.frame.output_storage", .package = "fun/sdfii", .step = "bench-frame-output-storage", .cwd = "fun/sdfii", .summary = "alternating SDFII frame output resolutions and modes", .tier = .standard, .surface = .benchmark, .bin = .{ .step = "bench-frame-output-storage-bin", .path = "zig-out/bin/sdfii-bench-frame-output-storage" }, .allocation_tracking = .{ .counters = .supported, .trace = .opt_in, .budget = .{ .previous_successful_run = 15 } }, .metric_threshold_percent = 15, .priority_component = "allocator" },    .{        .name = "sdfii.ui.surface_storage",        .package = "fun/sdfii",        .step = "sdfii-bench-ui-surface-storage",        .local_step = "bench-ui-surface-storage",        .summary = "repeated SDFII UI surface replacement",        .tier = .standard,        .surface = .benchmark,        .bin = .{            .step = "bench-ui-surface-storage-bin",            .path = "zig-out/bin/sdfii-bench-ui-surface-storage",        },        .allocation_tracking = .{ .counters = .supported, .trace = .opt_in, .budget = .{ .previous_successful_run = 15 } },        .metric_threshold_percent = 15,        .priority_component = "allocator",    },    .{ .name = "sdfii.dev.transport_scratch", .package = "fun/sdfii", .step = "bench-dev-transport-scratch", .cwd = "fun/sdfii", .summary = "repeated SDFII dev transport command scratch", .tier = .standard, .surface = .benchmark, .bin = .{ .step = "bench-dev-transport-scratch-bin", .path = "zig-out/bin/sdfii-bench-dev-transport-scratch" }, .allocation_tracking = .{ .counters = .supported, .trace = .opt_in, .budget = .{ .previous_successful_run = 15 } }, .metric_threshold_percent = 15, .priority_component = "allocator" },    .{ .name = "sdfii.session.state", .package = "fun/sdfii", .step = "bench-session-state", .cwd = "fun/sdfii", .summary = "SDFII typed session state capture and host replay", .tier = .standard, .surface = .benchmark, .bin = .{ .step = "bench-session-state-bin", .path = "zig-out/bin/sdfii-bench-session-state" }, .allocation_tracking = .{ .counters = .supported, .trace = .opt_in, .budget = .{ .previous_successful_run = 15 } }, .metric_threshold_percent = 15, .priority_component = "allocator" },    .{ .name = "sdfii.scene.compiler_scratch", .package = "fun/sdfii", .step = "bench-scene-compiler-scratch", .cwd = "fun/sdfii", .summary = "repeated SDFII compiler collision and scene phase scratch", .tier = .standard, .surface = .benchmark, .bin = .{ .step = "bench-scene-compiler-scratch-bin", .path = "zig-out/bin/sdfii-bench-scene-compiler-scratch" }, .allocation_tracking = .{ .counters = .supported, .trace = .opt_in, .budget = .{ .previous_successful_run = 15 } }, .metric_threshold_percent = 15, .priority_component = "allocator" },    .{ .name = "sdfii.animation.proposal", .package = "fun/sdfii", .step = "bench-animation-proposal", .cwd = "fun/sdfii", .summary = "repeated SDFII animation proposal solves", .tier = .standard, .surface = .benchmark, .bin = .{ .step = "bench-animation-proposal-bin", .path = "zig-out/bin/sdfii-bench-animation-proposal" }, .allocation_tracking = .{ .counters = .supported, .trace = .opt_in, .budget = .{ .previous_successful_run = 15 } }, .metric_threshold_percent = 15, .priority_component = "allocator" },    .{ .name = "sdfii.engine.physics_scratch", .package = "fun/sdfii", .step = "bench-physics-scratch", .cwd = "fun/sdfii", .summary = "repeated SDFII physics ABI and phase scratch", .tier = .standard, .surface = .benchmark, .bin = .{ .step = "bench-physics-scratch-bin", .path = "zig-out/bin/sdfii-bench-physics-scratch" }, .allocation_tracking = .{ .counters = .supported, .trace = .opt_in, .budget = .{ .previous_successful_run = 15 } }, .metric_threshold_percent = 15, .priority_component = "allocator" },    .{ .name = "sdfii.text.layout", .package = "fun/sdfii", .step = "bench-text-layout", .cwd = "fun/sdfii", .summary = "repeated SDFII text dirty-layout rebuilds", .tier = .standard, .surface = .benchmark, .bin = .{ .step = "bench-text-layout-bin", .path = "zig-out/bin/sdfii-bench-text-layout" }, .allocation_tracking = .{ .counters = .supported, .trace = .opt_in, .budget = .{ .previous_successful_run = 15 } }, .metric_threshold_percent = 15, .priority_component = "allocator" },    .{ .name = "sdfii.navigation.graph", .package = "fun/sdfii", .step = "bench-navigation-graph", .cwd = "fun/sdfii", .summary = "navigation graph construction benchmark", .tier = .expensive, .surface = .benchmark, .forwards_args = true },    .{ .name = "simd.ops", .package = "lib/simd", .step = "simd-bench", .local_step = "bench", .summary = "lib/simd fixed-width primitive and scalar-tail benchmarks", .tier = .smoke, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/simd-bench" }, .metric_threshold_percent = 20, .priority_component = "simd" },    .{ .name = "smt.sat", .package = "lib/smt", .step = "smt-bench", .local_step = "bench", .summary = "lib/smt SAT solver benchmarks", .tier = .standard, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/smt-bench" }, .allocation_tracking = .{ .counters = .supported, .trace = .default_on, .budget = .{ .previous_successful_run = 10 } }, .priority_component = "solver" },    .{ .name = "sql.store", .package = "lib/sql", .step = "sql-bench", .local_step = "bench", .summary = "lib/sql benchmark workloads", .tier = .standard, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/sql-bench" } },    .{        .name = "sql.recovery.history.256k",        .package = "lib/sql",        .step = "sql-recovery-history-256k",        .local_step = "recovery-history-256k",        .summary = "SQL history replay recovery curve with 256 KiB of row payloads",        .tier = .expensive,        .surface = .profile,        .bin = .{ .path = "zig-out/bin/sql-bench" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "sql recovery history replay 256 KiB" }},        .allocation_tracking = .{ .trace = .opt_in },        .priority_component = "storage",        .history_paths = &.{ "lib/sql/src/history", "lib/sql/src/profiling" },    },    .{        .name = "sql.recovery.history.1m",        .package = "lib/sql",        .step = "sql-recovery-history-1m",        .local_step = "recovery-history-1m",        .summary = "SQL history replay recovery curve with 1 MiB of row payloads",        .tier = .expensive,        .surface = .profile,        .bin = .{ .path = "zig-out/bin/sql-bench" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "sql recovery history replay 1 MiB" }},        .allocation_tracking = .{ .trace = .opt_in },        .priority_component = "storage",        .history_paths = &.{ "lib/sql/src/history", "lib/sql/src/profiling" },    },    .{        .name = "sql.recovery.history.4m",        .package = "lib/sql",        .step = "sql-recovery-history-4m",        .local_step = "recovery-history-4m",        .summary = "SQL history replay recovery curve with 4 MiB of row payloads",        .tier = .expensive,        .surface = .profile,        .bin = .{ .path = "zig-out/bin/sql-bench" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "sql recovery history replay 4 MiB" }},        .allocation_tracking = .{ .trace = .opt_in },        .priority_component = "storage",        .history_paths = &.{ "lib/sql/src/history", "lib/sql/src/profiling" },    },    .{        .name = "sql.recovery.history.16m",        .package = "lib/sql",        .step = "sql-recovery-history-16m",        .local_step = "recovery-history-16m",        .summary = "SQL history replay recovery curve with 16 MiB of row payloads",        .tier = .expensive,        .surface = .profile,        .bin = .{ .path = "zig-out/bin/sql-bench" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "sql recovery history replay 16 MiB" }},        .allocation_tracking = .{ .trace = .opt_in },        .priority_component = "storage",        .history_paths = &.{ "lib/sql/src/history", "lib/sql/src/profiling" },    },    .{        .name = "sql.history.contention",        .package = "lib/sql",        .step = "sql-history-contention-bench",        .local_step = "history-contention-bench",        .summary = "SQL history ref contention, batching, rejection, and durability matrix",        .tier = .standard,        .surface = .benchmark,        .bin = .{ .path = "zig-out/bin/sql-bench" },        .environment = &.{.{            .name = "BENCH_FILTER",            .value = "sql history ref",        }},        .allocation_tracking = .{            .counters = .supported,            .trace = .opt_in,            .budget = .{ .previous_successful_run = 15 },        },        .metric_threshold_percent = 10,        .priority_component = "storage",        .history_paths = &.{ "lib/sql/src/history", "lib/sql/src/profiling" },    },    .{ .name = "term.buffer", .package = "lib/term", .step = "term-bench", .local_step = "bench", .summary = "lib/term profiling benchmarks", .tier = .standard, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/term-bench" } },    .{ .name = "vt.grid", .package = "lib/vt", .step = "bench-grid", .cwd = "lib/vt", .summary = "VT grid capacity and warmed pool workloads", .tier = .standard, .surface = .benchmark, .bin = .{ .step = "bench-grid-bin", .path = "zig-out/bin/vt-grid-bench" }, .priority_component = "terminal" },    .{ .name = "vt.aggregate", .package = "lib/vt", .step = "vt-bench", .local_step = "bench", .summary = "Aggregate VT parser, terminal, render, and selection workloads", .tier = .expensive, .surface = .benchmark, .bin = .{ .step = "bench-bin", .path = "zig-out/bin/vt-bench" }, .priority_component = "terminal" },    .{        .name = "vt.parser",        .package = "lib/vt",        .step = "bench-parser",        .cwd = "lib/vt",        .summary = "VT mixed-stream parser feed",        .tier = .standard,        .surface = .benchmark,        .bin = .{            .step = "bench-bin",            .path = "zig-out/bin/vt-bench",        },        .environment = &.{.{            .name = "BENCH_FILTER",            .value = "term VT parser mixed stream",        }},        .allocation_tracking = .{            .counters = .supported,            .trace = .opt_in,            .budget = .{ .previous_successful_run = 15 },        },        .wall_threshold_percent = 5,        .rss_threshold_percent = 10,        .metric_threshold_percent = 5,        .priority_component = "terminal",        .history_paths = &.{ "lib/bench", "lib/coz", "lib/sys" },    },    .{        .name = "vt.control",        .package = "lib/vt",        .step = "bench-control",        .cwd = "lib/vt",        .summary = "VT mixed-stream semantic control decode",        .tier = .standard,        .surface = .benchmark,        .bin = .{            .step = "bench-bin",            .path = "zig-out/bin/vt-bench",        },        .environment = &.{.{            .name = "BENCH_FILTER",            .value = "term VT control mixed stream",        }},        .allocation_tracking = .{            .counters = .supported,            .trace = .opt_in,            .budget = .{ .previous_successful_run = 15 },        },        .wall_threshold_percent = 5,        .rss_threshold_percent = 10,        .metric_threshold_percent = 5,        .priority_component = "terminal",        .history_paths = &.{ "lib/bench", "lib/coz", "lib/sys" },    },    .{        .name = "vt.feed",        .package = "lib/vt",        .step = "bench-feed",        .cwd = "lib/vt",        .summary = "VT bounded terminal mixed-stream feed",        .tier = .standard,        .surface = .benchmark,        .bin = .{            .step = "bench-bin",            .path = "zig-out/bin/vt-bench",        },        .environment = &.{.{            .name = "BENCH_FILTER",            .value = "term VT terminal mixed stream",        }},        .allocation_tracking = .{            .counters = .supported,            .trace = .opt_in,            .budget = .{ .previous_successful_run = 15 },        },        .wall_threshold_percent = 5,        .rss_threshold_percent = 10,        .metric_threshold_percent = 5,        .priority_component = "terminal",        .history_paths = &.{ "lib/bench", "lib/coz", "lib/sys" },    },    .{        .name = "vt.render.dirty",        .package = "lib/vt",        .step = "bench-render-dirty",        .cwd = "lib/vt",        .summary = "VT one-cell dirty projection",        .tier = .standard,        .surface = .benchmark,        .bin = .{            .step = "bench-bin",            .path = "zig-out/bin/vt-bench",        },        .environment = &.{.{            .name = "BENCH_FILTER",            .value = "term VT render dirty projection",        }},        .allocation_tracking = .{            .counters = .supported,            .trace = .opt_in,            .budget = .{ .previous_successful_run = 15 },        },        .wall_threshold_percent = 5,        .rss_threshold_percent = 10,        .metric_threshold_percent = 5,        .priority_component = "terminal",        .history_paths = &.{ "lib/bench", "lib/coz", "lib/sys" },    },    .{        .name = "vt.resize",        .package = "lib/vt",        .step = "bench-resize",        .cwd = "lib/vt",        .summary = "VT populated session growth transfer",        .tier = .standard,        .surface = .benchmark,        .bin = .{            .step = "bench-bin",            .path = "zig-out/bin/vt-bench",        },        .environment = &.{.{            .name = "BENCH_FILTER",            .value = "term VT session growth transfer",        }},        .allocation_tracking = .{            .counters = .supported,            .trace = .opt_in,            .budget = .{ .previous_successful_run = 15 },        },        .wall_threshold_percent = 10,        .rss_threshold_percent = 10,        .metric_threshold_percent = 10,        .priority_component = "terminal",        .history_paths = &.{ "lib/bench", "lib/coz", "lib/sys" },    },    .{        .name = "reel.vt.replay",        .package = "tools/reel",        .step = "bench-vt-replay",        .cwd = "tools/reel",        .summary = "Reel deterministic VT tape replay snapshot",        .tier = .standard,        .surface = .benchmark,        .bin = .{            .step = "bench-vt-replay-bin",            .path = "zig-out/bin/reel-vt-replay-bench",        },        .allocation_tracking = .{            .counters = .supported,            .trace = .opt_in,            .budget = .{ .previous_successful_run = 15 },        },        .wall_threshold_percent = 10,        .rss_threshold_percent = 10,        .metric_threshold_percent = 10,        .priority_component = "terminal",        .history_paths = &.{ "lib/bench", "lib/coz", "lib/sys", "lib/term", "lib/vt" },    },    .{        .name = "vt.snapshot.encode",        .package = "lib/vt",        .step = "vt-state-encode-bench",        .local_step = "bench-state-encode",        .summary = "Canonical terminal state snapshot encoding",        .tier = .standard,        .surface = .benchmark,        .bin = .{            .step = "bench-state-bin",            .path = "zig-out/bin/vt-state-bench",        },        .environment = &.{.{            .name = "BENCH_FILTER",            .value = "term VT snapshot encode canonical",        }},        .allocation_tracking = .{            .counters = .supported,            .trace = .opt_in,            .budget = .{ .previous_successful_run = 10 },        },        .wall_threshold_percent = 10,        .rss_threshold_percent = 10,        .metric_threshold_percent = 10,        .priority_component = "snapshot",        .history_paths = &.{ "lib/alloc", "lib/bench", "lib/coz", "lib/sys" },    },    .{        .name = "vt.snapshot.decode",        .package = "lib/vt",        .step = "vt-state-decode-bench",        .local_step = "bench-state-decode",        .summary = "Full authenticated terminal state snapshot decoding",        .tier = .standard,        .surface = .benchmark,        .bin = .{            .step = "bench-state-bin",            .path = "zig-out/bin/vt-state-bench",        },        .environment = &.{.{            .name = "BENCH_FILTER",            .value = "term VT snapshot decode full",        }},        .allocation_tracking = .{            .counters = .supported,            .trace = .opt_in,            .budget = .{ .previous_successful_run = 10 },        },        .wall_threshold_percent = 10,        .rss_threshold_percent = 10,        .metric_threshold_percent = 10,        .priority_component = "snapshot",        .history_paths = &.{ "lib/alloc", "lib/bench", "lib/coz", "lib/sys" },    },    .{        .name = "vt.snapshot.ready",        .package = "lib/vt",        .step = "vt-state-ready-bench",        .local_step = "bench-state-ready",        .summary = "Authenticated terminal state READY publication without older history",        .tier = .standard,        .surface = .benchmark,        .bin = .{            .step = "bench-state-bin",            .path = "zig-out/bin/vt-state-bench",        },        .environment = &.{.{            .name = "BENCH_FILTER",            .value = "term VT snapshot publish READY",        }},        .allocation_tracking = .{            .counters = .supported,            .trace = .opt_in,            .budget = .{ .previous_successful_run = 10 },        },        .wall_threshold_percent = 10,        .rss_threshold_percent = 10,        .metric_threshold_percent = 10,        .priority_component = "snapshot",        .history_paths = &.{ "lib/alloc", "lib/bench", "lib/coz", "lib/sys" },    },    .{ .name = "windowing.presentation", .package = "lib/windowing", .step = "windowing-bench", .local_step = "bench", .summary = "lib/windowing native presentation benchmarks", .tier = .expensive, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/windowing-bench" }, .allocation_tracking = .{ .counters = .supported, .trace = .opt_in, .budget = .{ .previous_successful_run = 10 } }, .priority_component = "allocator" },    .{ .name = "css.engine", .package = "lib/css", .step = "css-bench", .local_step = "bench", .summary = "lib/css parse, bucket index, selector match, and cascade benchmarks", .tier = .smoke, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/css-bench" }, .metric_threshold_percent = 20, .priority_component = "style" },    .{ .name = "ui.envelope", .package = "lib/ui", .step = "ui-bench", .local_step = "bench", .summary = "lib/ui publish envelope admission, splice, and retained publish benchmarks", .tier = .smoke, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/ui-bench" }, .metric_threshold_percent = 20, .priority_component = "style" },    .{ .name = "unicode.text", .package = "lib/unicode", .step = "unicode-bench", .local_step = "bench", .summary = "lib/unicode segmentation, width, and navigation benchmarks", .tier = .smoke, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/unicode-bench" }, .metric_threshold_percent = 20, .priority_component = "text" },    .{ .name = "tracker.store", .package = "lib/tracker", .step = "tracker-bench", .local_step = "bench", .summary = "lib/tracker store benchmarks", .tier = .standard, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/tracker-bench" } },    .{        .name = "tracker.contention",        .package = "lib/tracker",        .step = "tracker-contention",        .local_step = "contention",        .summary = "Tracker issue contention, batching, rejection, and durability matrix",        .tier = .standard,        .surface = .benchmark,        .bin = .{ .path = "zig-out/bin/tracker-bench" },        .environment = &.{.{            .name = "BENCH_FILTER",            .value = "tracker issue contention",        }},        .allocation_tracking = .{            .counters = .supported,            .trace = .opt_in,            .budget = .{ .previous_successful_run = 15 },        },        .metric_threshold_percent = 10,        .priority_component = "storage",        .history_paths = &.{ "lib/tracker/src/store", "lib/tracker/src/profiling" },    },    .{        .name = "tracker.recovery.cold.16",        .package = "lib/tracker",        .step = "tracker-recovery-cold-16",        .local_step = "recovery-cold-16",        .summary = "Tracker cold-open recovery curve with sixteen issues",        .tier = .expensive,        .surface = .profile,        .bin = .{ .path = "zig-out/bin/tracker-bench" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "tracker recovery cold open issues 16" }},        .allocation_tracking = .{ .trace = .opt_in },        .priority_component = "storage",        .history_paths = &.{ "lib/tracker/src/store", "lib/tracker/src/profiling" },    },    .{        .name = "tracker.recovery.cold.64",        .package = "lib/tracker",        .step = "tracker-recovery-cold-64",        .local_step = "recovery-cold-64",        .summary = "Tracker cold-open recovery curve with sixty-four issues",        .tier = .expensive,        .surface = .profile,        .bin = .{ .path = "zig-out/bin/tracker-bench" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "tracker recovery cold open issues 64" }},        .allocation_tracking = .{ .trace = .opt_in },        .priority_component = "storage",        .history_paths = &.{ "lib/tracker/src/store", "lib/tracker/src/profiling" },    },    .{        .name = "tracker.recovery.cold.256",        .package = "lib/tracker",        .step = "tracker-recovery-cold-256",        .local_step = "recovery-cold-256",        .summary = "Tracker cold-open recovery curve with two hundred fifty-six issues",        .tier = .expensive,        .surface = .profile,        .bin = .{ .path = "zig-out/bin/tracker-bench" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "tracker recovery cold open issues 256" }},        .allocation_tracking = .{ .trace = .opt_in },        .priority_component = "storage",        .history_paths = &.{ "lib/tracker/src/store", "lib/tracker/src/profiling" },    },    .{        .name = "tracker.recovery.cold.1024",        .package = "lib/tracker",        .step = "tracker-recovery-cold-1024",        .local_step = "recovery-cold-1024",        .summary = "Tracker cold-open recovery curve with one thousand twenty-four issues",        .tier = .expensive,        .surface = .profile,        .bin = .{ .path = "zig-out/bin/tracker-bench" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "tracker recovery cold open issues 1024" }},        .allocation_tracking = .{ .trace = .opt_in },        .priority_component = "storage",        .history_paths = &.{ "lib/tracker/src/store", "lib/tracker/src/profiling" },    },    .{        .name = "tracker.recovery.rebuild.16",        .package = "lib/tracker",        .step = "tracker-recovery-rebuild-16",        .local_step = "recovery-rebuild-16",        .summary = "Tracker history rebuild recovery curve with sixteen issues",        .tier = .expensive,        .surface = .profile,        .bin = .{ .path = "zig-out/bin/tracker-bench" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "tracker recovery history rebuild issues 16" }},        .allocation_tracking = .{ .trace = .opt_in },        .priority_component = "storage",        .history_paths = &.{ "lib/tracker/src/store", "lib/tracker/src/profiling" },    },    .{        .name = "tracker.recovery.rebuild.64",        .package = "lib/tracker",        .step = "tracker-recovery-rebuild-64",        .local_step = "recovery-rebuild-64",        .summary = "Tracker history rebuild recovery curve with sixty-four issues",        .tier = .expensive,        .surface = .profile,        .bin = .{ .path = "zig-out/bin/tracker-bench" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "tracker recovery history rebuild issues 64" }},        .allocation_tracking = .{ .trace = .opt_in },        .priority_component = "storage",        .history_paths = &.{ "lib/tracker/src/store", "lib/tracker/src/profiling" },    },    .{        .name = "tracker.recovery.rebuild.256",        .package = "lib/tracker",        .step = "tracker-recovery-rebuild-256",        .local_step = "recovery-rebuild-256",        .summary = "Tracker history rebuild recovery curve with two hundred fifty-six issues",        .tier = .expensive,        .surface = .profile,        .bin = .{ .path = "zig-out/bin/tracker-bench" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "tracker recovery history rebuild issues 256" }},        .allocation_tracking = .{ .trace = .opt_in },        .priority_component = "storage",        .history_paths = &.{ "lib/tracker/src/store", "lib/tracker/src/profiling" },    },    .{        .name = "tracker.recovery.rebuild.1024",        .package = "lib/tracker",        .step = "tracker-recovery-rebuild-1024",        .local_step = "recovery-rebuild-1024",        .summary = "Tracker history rebuild recovery curve with one thousand twenty-four issues",        .tier = .expensive,        .surface = .profile,        .bin = .{ .path = "zig-out/bin/tracker-bench" },        .environment = &.{.{ .name = "BENCH_FILTER", .value = "tracker recovery history rebuild issues 1024" }},        .allocation_tracking = .{ .trace = .opt_in },        .priority_component = "storage",        .history_paths = &.{ "lib/tracker/src/store", "lib/tracker/src/profiling" },    },    .{ .name = "trace.storage", .package = "lib/trace", .step = "trace-bench", .local_step = "bench", .summary = "lib/trace chunked recording and verification benchmarks", .tier = .standard, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/trace-bench" }, .metric_threshold_percent = 20, .priority_component = "storage" },    .{ .name = "zen.site", .package = "lib/zen", .step = "zen-bench", .local_step = "bench", .summary = "lib/zen static site generator benchmarks", .tier = .standard, .surface = .benchmark, .bin = .{ .path = "zig-out/bin/zen-bench" } },};pub const workloads = projectWorkloads(complete_workloads);fn projectWorkloads(    comptime source: anytype,) [enabledWorkloadCount(source)]Workload {    var result: [enabledWorkloadCount(source)]Workload = undefined;    var retained_count: usize = 0;    for (source) |workload| {        if (!workloadEnabled(workload)) continue;        if (retained_count == result.len) {            @compileError("profiling workload projection is incomplete");        }        result[retained_count] = workload;        retained_count += 1;    }    if (retained_count != result.len) {        @compileError("profiling workload projection is incomplete");    }    return result;}fn enabledWorkloadCount(comptime source: anytype) usize {    @setEvalBranchQuota(100_000);    var workload_count: usize = 0;    for (source) |workload| {        if (workloadEnabled(workload)) workload_count += 1;    }    return workload_count;}fn workloadEnabled(workload: Workload) bool {    if (!surface.docs_publication and workloadReferencesOwner(workload, "press")) return false;    if (!surface.research and workloadReferencesOwner(workload, "research")) return false;    if (!surface.style and workloadReferencesOwner(workload, "tools/style")) return false;    if (!surface.stardust and workloadReferencesOwner(workload, "tools/stardust")) return false;    return true;}fn workloadReferencesOwner(workload: Workload, owner: []const u8) bool {    if (pathOwnedBy(workload.package, owner)) return true;    if (workload.cwd) |cwd| if (pathOwnedBy(cwd, owner)) return true;    if (workload.bin) |bin| {        if (pathOwnedBy(bin.path, owner)) return true;        if (bin.cwd) |cwd| if (pathOwnedBy(cwd, owner)) return true;        for (bin.args) |arg| if (pathOwnedBy(arg, owner)) return true;    }    if (workload.prepare) |command| if (commandReferencesOwner(command, owner)) return true;    if (workload.reset) |command| if (commandReferencesOwner(command, owner)) return true;    for (workload.environment) |entry| {        if (entry.value) |value| if (pathOwnedBy(value, owner)) return true;    }    for (workload.history_paths) |path| if (pathOwnedBy(path, owner)) return true;    return false;}fn commandReferencesOwner(command: Command, owner: []const u8) bool {    if (command.cwd) |cwd| if (pathOwnedBy(cwd, owner)) return true;    for (command.argv) |arg| if (pathOwnedBy(arg, owner)) return true;    return false;}fn pathOwnedBy(path: []const u8, owner: []const u8) bool {    if (std.mem.eql(u8, path, owner)) return true;    if (!std.mem.startsWith(u8, path, owner)) return false;    return path.len > owner.len and path[owner.len] == '/';}const AllocationCensus = struct {    workloads: usize = 0,    counters_supported: usize = 0,    counters_unknown: usize = 0,    counters_unsupported: usize = 0,    traces_supported: usize = 0,    traces_default: usize = 0,    traces_unknown: usize = 0,    traces_unsupported: usize = 0,    budgeted: usize = 0,    priority: usize = 0,    priority_counters_supported: usize = 0,    priority_traces_supported: usize = 0,};const press_workload_count = @as(    usize,    @intFromBool(surface.docs_publication),);const research_workload_count = 2 * @as(    usize,    @intFromBool(surface.research),);const stardust_workload_count = 3 * @as(usize, @intFromBool(surface.stardust));const baseline_census: AllocationCensus = .{    .workloads = 137 + 2 * press_workload_count + research_workload_count + stardust_workload_count,    .counters_supported = 40 + stardust_workload_count,    .counters_unknown = 91 + press_workload_count + research_workload_count,    .counters_unsupported = 6 + press_workload_count,    .traces_supported = 54 + stardust_workload_count,    .traces_default = 14,    .traces_unknown = 79 + press_workload_count + research_workload_count,    .traces_unsupported = 4 + press_workload_count,    .budgeted = 40 + stardust_workload_count,    .priority = 15,    .priority_counters_supported = 15,    .priority_traces_supported = 15,};comptime {    @setEvalBranchQuota(100_000);    var census: AllocationCensus = .{ .workloads = workloads.len };    for (workloads) |workload| {        validateWorkload(workload) catch @compileError("invalid profiling workload runtime declaration");        const budget_percent = workload.allocationBudgetPercent();        if (workload.supportsAllocationCounters() != (budget_percent != null)) {            @compileError("allocation counter support and allocation budget must be declared together");        }        if (budget_percent) |percent| {            if (!(percent > 0 and percent <= 100)) {                @compileError("allocation budget percent must be finite and in (0, 100]");            }        }        observeAllocations(&census, workload);    }    assertCensusPartitions(census);    for (@typeInfo(AllocationCensus).@"struct".field_names) |field| {        if (@field(census, field) != @field(baseline_census, field)) {            @compileError(censusDrift(census));        }    }}fn observeAllocations(census: *AllocationCensus, workload: Workload) void {    switch (workload.allocation_tracking.counters) {        .supported => census.counters_supported += 1,        .unknown => census.counters_unknown += 1,        .unsupported => census.counters_unsupported += 1,    }    switch (workload.allocation_tracking.trace) {        .opt_in => census.traces_supported += 1,        .default_on => {            census.traces_supported += 1;            census.traces_default += 1;        },        .unknown => census.traces_unknown += 1,        .unsupported => census.traces_unsupported += 1,    }    if (workload.allocationBudgetPercent() != null) census.budgeted += 1;    if (!workload.isAllocationPriority()) return;    census.priority += 1;    if (workload.supportsAllocationCounters()) census.priority_counters_supported += 1;    if (workload.supportsAllocationTrace()) census.priority_traces_supported += 1;}fn assertCensusPartitions(census: AllocationCensus) void {    std.debug.assert(census.workloads == census.counters_supported +        census.counters_unknown + census.counters_unsupported);    std.debug.assert(census.workloads == census.traces_supported +        census.traces_unknown + census.traces_unsupported);    std.debug.assert(census.traces_default <= census.traces_supported);    std.debug.assert(census.priority <= census.workloads);    std.debug.assert(census.priority_counters_supported <= census.priority);    std.debug.assert(census.priority_traces_supported <= census.priority);}fn censusDrift(comptime census: AllocationCensus) []const u8 {    var report: []const u8 = census_drift_headline;    inline for (@typeInfo(AllocationCensus).@"struct".field_names) |field| {        if (@field(census, field) != @field(baseline_census, field)) {            report = report ++ std.fmt.comptimePrint("\n  {s}: baseline {d}, observed {d}", .{                field,                @field(baseline_census, field),                @field(census, field),            });        }    }    return report ++ census_drift_guidance;}const census_drift_headline =    "profiling workload allocation census drifted from the baseline";const census_drift_guidance =    "\nadding, retiring, or re-declaring a workload is legitimate: update baseline_census in" ++    "\nsrc/profiling/catalog.zig in the same change, once the observed counts are intended" ++    "\nnever add an allocation declaration to a workload so that a count matches";pub fn find(value: []const u8) ?Workload {    for (workloads) |workload| {        if (workload.matches(value)) return workload;    }    return null;}pub fn count(suite: Suite) usize {    var result: usize = 0;    for (workloads) |workload| {        if (workload.includedIn(suite)) result += 1;    }    return result;}test "profiling catalog has unique workload names and steps" {    for (workloads, 0..) |left, left_index| {        for (workloads[left_index + 1 ..]) |right| {            try std.testing.expect(!std.mem.eql(u8, left.name, right.name));            try std.testing.expect(!std.mem.eql(u8, left.step, right.step));        }    }}test "Chic workload families pin the evidence contract" {    const names = [_][]const u8{        "chic.engine",        "chic.host",        "chic.turn",        "chic.lifecycle",        "chic.presence",        "chic.authority",        "chic.journal",        "chic.recovery",        "chic.dispatch",        "chic.realm_isolation",        "chic.overload",    };    for (names) |name| {        const workload = find(name).?;        try std.testing.expectEqualStrings("lib/chic", workload.package);        const expected_tier: Tier = if (std.mem.eql(u8, name, "chic.engine") or            std.mem.eql(u8, name, "chic.host")) .smoke else .standard;        try std.testing.expectEqual(expected_tier, workload.tier);        try std.testing.expectEqual(Surface.benchmark, workload.surface);        try std.testing.expect(workload.supportsAllocationCounters());        try std.testing.expect(workload.tracesAllocationsByDefault());        try std.testing.expectEqual(@as(f64, 10), workload.wall_threshold_percent.?);        try std.testing.expectEqual(@as(f64, 10), workload.rss_threshold_percent.?);        try std.testing.expectEqual(@as(f64, 10), workload.metric_threshold_percent.?);        try std.testing.expect(std.mem.indexOf(u8, workload.summary, "ReleaseFast") != null);        try std.testing.expect(std.mem.indexOf(u8, workload.summary, "median nanoseconds") != null);        try std.testing.expect(std.mem.indexOf(            u8,            workload.summary,            "Limit witnesses pass before",        ) != null);    }    const reference_names = [_][]const u8{        "chic.presence",        "chic.authority",        "chic.dispatch",    };    for (reference_names) |name| {        const workload = find(name).?;        try std.testing.expect(std.mem.indexOf(u8, workload.summary, "zero allocations") != null);    }    const kernel_owners = [_]struct { name: []const u8, issue: []const u8 }{        .{ .name = "chic.turn", .issue = "tiny-8qh815kn" },        .{ .name = "chic.lifecycle", .issue = "tiny-7mvyiag5" },        .{ .name = "chic.journal", .issue = "tiny-8qh815kn" },        .{ .name = "chic.recovery", .issue = "tiny-8qh815kn" },        .{ .name = "chic.realm_isolation", .issue = "tiny-8qh815kn" },        .{ .name = "chic.overload", .issue = "tiny-8qh815kn" },    };    for (kernel_owners) |owner| {        const workload = find(owner.name).?;        try std.testing.expect(std.mem.indexOf(u8, workload.summary, owner.issue) != null);    }}test "machine lifecycle catalog pins three direct lanes" {    const expected = [_]struct {        name: []const u8,        step: []const u8,        local_step: []const u8,        selector: []const u8,    }{        .{ .name = "machine.native", .step = "machine-bench-native", .local_step = "bench-native", .selector = "native" },        .{ .name = "machine.kvm", .step = "machine-bench-kvm", .local_step = "bench-kvm", .selector = "kvm" },        .{ .name = "machine.reference", .step = "machine-bench-reference", .local_step = "bench-reference", .selector = "reference" },    };    for (expected) |entry| {        const workload = find(entry.name).?;        try std.testing.expectEqualStrings("lib/machine", workload.package);        try std.testing.expectEqualStrings(entry.step, workload.step);        try std.testing.expectEqualStrings(entry.local_step, workload.localStep());        try std.testing.expectEqual(Tier.standard, workload.tier);        try std.testing.expectEqual(Surface.benchmark, workload.surface);        try std.testing.expectEqual(AllocationCounterSupport.unsupported, workload.allocation_tracking.counters);        try std.testing.expectEqual(AllocationTracePolicy.unsupported, workload.allocation_tracking.trace);        try std.testing.expectEqual(@as(usize, 1), workload.environment.len);        try std.testing.expectEqualStrings("TINY_MACHINE_PROFILE_LANE", workload.environment[0].name);        try std.testing.expectEqualStrings(entry.selector, workload.environment[0].value.?);        const bin = workload.bin.?;        try std.testing.expectEqualStrings("bench-bin", bin.step);        try std.testing.expectEqualStrings("zig-out/bin/machine-bench", bin.path);    }}test "profiling catalog validates direct preparation and reset commands" {    const valid = Workload{        .name = "fixture",        .package = "lib/fixture",        .step = "fixture-bench",        .summary = "fixture",        .tier = .smoke,        .surface = .benchmark,        .bin = .{ .path = "zig-out/bin/fixture" },        .prepare = .{ .argv = &.{ "zig-out/bin/fixture", "prepare" } },        .reset = .{ .argv = &.{ "zig-out/bin/fixture", "reset" } },    };    try validateWorkload(valid);    var without_binary = valid;    without_binary.bin = null;    try std.testing.expectError(        error.PrepareRequiresDirectBinary,        validateWorkload(without_binary),    );    var reset_without_binary = valid;    reset_without_binary.bin = null;    reset_without_binary.prepare = null;    try std.testing.expectError(        error.ResetRequiresDirectBinary,        validateWorkload(reset_without_binary),    );    var empty_prepare = valid;    empty_prepare.prepare = .{ .argv = &.{} };    try std.testing.expectError(        error.InvalidPrepareCommand,        validateWorkload(empty_prepare),    );    var empty = valid;    empty.prepare = null;    empty.reset = .{ .argv = &.{} };    try std.testing.expectError(error.InvalidResetCommand, validateWorkload(empty));    var environment_without_binary = valid;    environment_without_binary.bin = null;    environment_without_binary.prepare = null;    environment_without_binary.reset = null;    environment_without_binary.environment = &.{.{        .name = "HOME",        .value = "/tmp/profile-home",    }};    try std.testing.expectError(        error.EnvironmentRequiresDirectBinary,        validateWorkload(environment_without_binary),    );}test "profiling catalog resolves run-owned direct runtime declarations" {    var arena_state = std.heap.ArenaAllocator.init(std.testing.allocator);    defer arena_state.deinit();    const allocator = arena_state.allocator();    const workload = Workload{        .name = "fixture",        .package = "lib/fixture",        .step = "fixture-bench",        .summary = "fixture",        .tier = .smoke,        .surface = .benchmark,        .bin = .{            .path = "zig-out/bin/fixture",            .args = &.{ "consume", "{workload_root}/live" },        },        .prepare = .{            .argv = &.{ "zig-out/bin/fixture-helper", "prepare", "{workload_root}" },            .cwd = "{workload_root}/fixture",        },        .reset = .{            .argv = &.{ "zig-out/bin/fixture-helper", "reset", "{workload_root}" },        },        .environment = &.{            .{ .name = "HOME", .value = "{workload_root}/home" },            .{ .name = "EMPTY", .value = "" },            .{ .name = "STALE_PATH" },        },    };    const root = "/tmp/profile/run/workloads/fixture";    const runtime = try resolveRuntime(allocator, workload, root);    try std.testing.expectEqualStrings(root, runtime.workload_root);    try std.testing.expectEqualStrings("consume", runtime.bin_args[0]);    try std.testing.expectEqualStrings(        "/tmp/profile/run/workloads/fixture/live",        runtime.bin_args[1],    );    try std.testing.expectEqualStrings(root, runtime.prepare.?.argv[2]);    try std.testing.expectEqualStrings(        "/tmp/profile/run/workloads/fixture/fixture",        runtime.prepare.?.cwd.?,    );    try std.testing.expectEqualStrings("lib/fixture", runtime.reset.?.cwd.?);    try std.testing.expectEqualStrings(        "/tmp/profile/run/workloads/fixture/home",        runtime.environment[0].value.?,    );    try std.testing.expectEqualStrings("", runtime.environment[1].value.?);    try std.testing.expect(runtime.environment[2].value == null);    try std.testing.expectEqualStrings(        "{workload_root}/live",        workload.bin.?.args[1],    );    try std.testing.expectEqualStrings(        "{workload_root}/home",        workload.environment[0].value.?,    );    try std.testing.expectError(        error.InvalidWorkloadRoot,        resolveRuntime(allocator, workload, "relative/run"),    );}test "profiling catalog bounds set and unset environment overrides" {    try validateEnvironment(&.{        .{ .name = "HOME", .value = "/tmp/profile-home" },        .{ .name = "FIXTURE_OBSERVATION_PATH" },    });    try std.testing.expectEqualStrings(        "set",        (EnvironmentOverride{ .name = "HOME", .value = "/tmp" }).operation(),    );    try std.testing.expectEqualStrings(        "unset",        (EnvironmentOverride{ .name = "FIXTURE_OBSERVATION_PATH" }).operation(),    );    try std.testing.expectError(        error.DuplicateEnvironmentOverride,        validateEnvironment(&.{            .{ .name = "HOME", .value = "/tmp/a" },            .{ .name = "HOME", .value = "/tmp/b" },        }),    );    try std.testing.expectError(        error.InvalidEnvironmentName,        validateEnvironment(&.{.{ .name = "BAD=NAME", .value = "x" }}),    );    const too_many = [_]EnvironmentOverride{        .{ .name = "A" }, .{ .name = "B" }, .{ .name = "C" },        .{ .name = "D" }, .{ .name = "E" }, .{ .name = "F" },        .{ .name = "G" }, .{ .name = "H" }, .{ .name = "I" },        .{ .name = "J" }, .{ .name = "K" }, .{ .name = "L" },        .{ .name = "M" }, .{ .name = "N" }, .{ .name = "O" },        .{ .name = "P" }, .{ .name = "Q" },    };    try std.testing.expectError(        error.TooManyEnvironmentOverrides,        validateEnvironment(too_many[0..]),    );}test "profiling catalog rejects reset and environment byte overflow" {    const left_argument: [maximum_command_bytes / 2 + 1]u8 = @splat('a');    const right_argument: [maximum_command_bytes / 2]u8 = @splat('b');    const workload = Workload{        .name = "fixture",        .package = "lib/fixture",        .step = "fixture-bench",        .summary = "fixture",        .tier = .smoke,        .surface = .benchmark,        .bin = .{ .path = "zig-out/bin/fixture" },        .reset = .{ .argv = &.{ left_argument[0..], right_argument[0..] } },    };    try std.testing.expectError(        error.ResetCommandTooLarge,        validateWorkload(workload),    );    var binary_overflow = workload;    binary_overflow.reset = null;    binary_overflow.bin = .{        .path = "zig-out/bin/fixture",        .args = &.{ left_argument[0..], right_argument[0..] },    };    try std.testing.expectError(        error.BinaryArgumentsTooLarge,        validateWorkload(binary_overflow),    );    binary_overflow.bin = .{        .path = "zig-out/bin/fixture",        .args = &.{"bad\x00argument"},    };    try std.testing.expectError(        error.InvalidBinaryArgument,        validateWorkload(binary_overflow),    );    const too_large_value: [maximum_environment_value_bytes + 1]u8 = @splat('x');    try std.testing.expectError(        error.InvalidEnvironmentValue,        validateEnvironment(&.{.{            .name = "A",            .value = too_large_value[0..],        }}),    );    const maximum_value: [maximum_environment_value_bytes]u8 = @splat('x');    try std.testing.expectError(        error.EnvironmentOverridesTooLarge,        validateEnvironment(&.{            .{ .name = "A", .value = maximum_value[0..] },            .{ .name = "B", .value = maximum_value[0..] },            .{ .name = "C", .value = maximum_value[0..] },            .{ .name = "D", .value = maximum_value[0..] },        }),    );}test "profiling suites widen monotonically" {    for (workloads) |workload| {        if (workload.includedIn(.smoke)) try std.testing.expect(workload.includedIn(.standard));        if (workload.includedIn(.standard)) try std.testing.expect(workload.includedIn(.all));    }}test "profiling suite parser recognizes catalog suites" {    try std.testing.expectEqual(Suite.smoke, Suite.parse("smoke").?);    try std.testing.expectEqual(Suite.standard, Suite.parse("standard").?);    try std.testing.expectEqual(Suite.all, Suite.parse("all").?);    try std.testing.expect(Suite.parse("fast") == null);}test "profiling workload thresholds can override the analysis default" {    try std.testing.expectEqual(@as(f64, 30), find("gpalloc.allocator").?.metricThresholdPercent(10));    try std.testing.expectEqual(@as(f64, 10), find("gpalloc.allocator").?.wallThresholdPercent(10));    try std.testing.expectEqual(@as(f64, 25), find("bumpalo.allocator").?.metricThresholdPercent(10));    try std.testing.expectEqual(@as(f64, 10), find("choir.compiler").?.metricThresholdPercent(10));    try std.testing.expectEqual(@as(f64, 20), find("choir.wasm-emitter").?.metricThresholdPercent(10));    try std.testing.expectEqual(@as(f64, 5), find("vt.parser").?.metricThresholdPercent(10));    try std.testing.expectEqual(@as(f64, 5), find("vt.control").?.metricThresholdPercent(10));    try std.testing.expectEqual(@as(f64, 5), find("vt.feed").?.metricThresholdPercent(10));    try std.testing.expectEqual(@as(f64, 5), find("vt.render.dirty").?.metricThresholdPercent(10));    try std.testing.expectEqual(@as(f64, 10), find("vt.resize").?.metricThresholdPercent(20));}test "profiling workload priority metadata defaults to package grouping" {    try std.testing.expectEqual(@as(f64, 1), find("choir.compiler").?.priorityWeight());    try std.testing.expectEqualStrings("lib/choir", find("choir.compiler").?.priorityComponent());    try std.testing.expectEqualStrings("allocator", find("gpalloc.allocator").?.priorityComponent());}test "Stardust observer workloads separate startup and supplied snapshot storage" {    if (!surface.stardust) {        try std.testing.expect(find("stardust.observer.startup") == null);        try std.testing.expect(find("stardust.observer.document") == null);        try std.testing.expect(find("stardust.observer.cache") == null);        return;    }    const startup = find("stardust.observer.startup").?;    const document = find("stardust.observer.document").?;    const cache = find("stardust.observer.cache").?;    for ([_]Workload{ startup, document, cache }) |workload| {        try std.testing.expectEqualStrings("tools/stardust", workload.package);        try std.testing.expectEqualStrings("bench-bin", workload.bin.?.step);        try std.testing.expectEqualStrings("zig-out/bin/stardust-bench", workload.bin.?.path);        try std.testing.expectEqualStrings("BENCH_FILTER", workload.environment[0].name);        try std.testing.expectEqualStrings(workload.name, workload.environment[0].value.?);        try std.testing.expect(workload.supportsAllocationCounters());        try std.testing.expect(workload.supportsAllocationTrace());    }    try std.testing.expectEqualStrings("stardust-bench", startup.step);    try std.testing.expectEqualStrings("bench", startup.localStep());    try std.testing.expectEqual(Tier.smoke, startup.tier);    try std.testing.expectEqual(@as(usize, 1), startup.environment.len);    try std.testing.expectEqualStrings("stardust-document-bench", document.step);    try std.testing.expectEqualStrings("document-bench", document.localStep());    try std.testing.expectEqual(Tier.expensive, document.tier);    try std.testing.expectEqual(@as(usize, 2), document.environment.len);    try std.testing.expectEqualStrings("STARDUST_BENCH_SNAPSHOT", document.environment[1].name);    try std.testing.expectEqualStrings("{workload_root}/snapshot", document.environment[1].value.?);    try std.testing.expectEqualStrings("stardust-cache-bench", cache.step);    try std.testing.expectEqualStrings("cache-bench", cache.localStep());    try std.testing.expectEqual(Tier.expensive, cache.tier);    try std.testing.expectEqual(@as(usize, 2), cache.environment.len);    try std.testing.expectEqualStrings("STARDUST_BENCH_SNAPSHOT", cache.environment[1].name);    try std.testing.expectEqualStrings("{workload_root}/snapshot", cache.environment[1].value.?);}test "SMG production workloads pin operator-provided live-store inputs" {    const expected = [_]struct {        name: []const u8,        step: []const u8,        local_step: []const u8,    }{        .{            .name = "smg.production.about_missing",            .step = "smg-production-about",            .local_step = "production-about",        },        .{            .name = "smg.production.overview",            .step = "smg-production-overview",            .local_step = "production-overview",        },    };    for (expected) |entry| {        const workload = find(entry.name).?;        try std.testing.expectEqualStrings("tools/smg", workload.package);        try std.testing.expectEqualStrings(entry.step, workload.step);        try std.testing.expectEqualStrings(entry.local_step, workload.localStep());        try std.testing.expectEqual(Tier.expensive, workload.tier);        try std.testing.expectEqual(Surface.profile, workload.surface);        try std.testing.expectEqualStrings("production-bench-bin", workload.bin.?.step);        try std.testing.expectEqualStrings("zig-out/bin/smg-production-bench", workload.bin.?.path);        try std.testing.expectEqual(@as(usize, 2), workload.environment.len);        try std.testing.expectEqualStrings("BENCH_FILTER", workload.environment[0].name);        try std.testing.expectEqualStrings(entry.name, workload.environment[0].value.?);        try std.testing.expectEqualStrings("SMG_BENCH_STORE_DIR", workload.environment[1].name);        try std.testing.expectEqualStrings(workload_root_token, workload.environment[1].value.?);        try std.testing.expectEqual(AllocationTracePolicy.opt_in, workload.allocation_tracking.trace);        try std.testing.expectEqual(@as(f64, 20), workload.wallThresholdPercent(10));        try std.testing.expectEqual(@as(f64, 20), workload.rssThresholdPercent(10));        try std.testing.expectEqualStrings("storage", workload.priorityComponent());    }}test "docs publication workload pins production shape and evidence thresholds" {    if (!surface.docs_publication) {        try std.testing.expect(find("web.docs.publication") == null);        return;    }    const workload = find("web.docs.publication").?;    try std.testing.expectEqualStrings("tools/web", workload.package);    try std.testing.expectEqual(Tier.expensive, workload.tier);    try std.testing.expectEqual(Surface.profile, workload.surface);    try std.testing.expectEqual(@as(f64, 20), workload.wallThresholdPercent(10));    try std.testing.expectEqual(@as(f64, 20), workload.rssThresholdPercent(10));    try std.testing.expectEqualStrings("docs", workload.priorityComponent());    try std.testing.expectEqualStrings(        "web-docs-publication-profile-bin",        workload.bin.?.step,    );    try std.testing.expectEqualStrings(".", workload.bin.?.cwd.?);    try std.testing.expectEqualSlices(        []const u8,        &.{ "publish", "{workload_root}/publication" },        workload.bin.?.args,    );    try std.testing.expect(workload.reset != null);}test "profiling catalog filters held owner workloads" {    for (workloads) |workload| {        try std.testing.expect(workloadEnabled(workload));    }    try std.testing.expectEqual(        surface.docs_publication,        find("web.slides.editor") != null,    );    try std.testing.expectEqual(        surface.docs_publication,        find("web.docs.publication") != null,    );    try std.testing.expectEqual(surface.research, find("sai.stage") != null);}test "profiling workloads declare allocation observability explicitly" {    try std.testing.expectEqual(AllocationTracePolicy.opt_in, find("gpalloc.allocator").?.allocation_tracking.trace);    try std.testing.expect(find("gpalloc.allocator").?.supportsAllocationTrace());    try std.testing.expect(find("gpalloc.allocator").?.supportsAllocationCounters());    try std.testing.expect(find("gpalloc.compare").?.supportsAllocationCounters());    try std.testing.expect(find("gpalloc.compare").?.supportsAllocationTrace());    try std.testing.expect(find("bumpalo.allocator").?.tracesAllocationsByDefault());    try std.testing.expect(find("bumpalo.allocator").?.supportsAllocationTrace());    try std.testing.expectEqual(        AllocationBaselinePolicy.previous_successful_run,        find("gpalloc.allocator").?.allocationBaselinePolicy(),    );    try std.testing.expectEqual(        @as(?f64, 30),        find("gpalloc.allocator").?.allocationBudgetPercent(),    );}test "terminal profiling lanes pin direct semantic workloads" {    const vt_lanes = [_][]const u8{        "vt.parser",        "vt.control",        "vt.feed",        "vt.render.dirty",        "vt.resize",    };    for (vt_lanes) |name| {        const workload = find(name).?;        try std.testing.expectEqualStrings("lib/vt", workload.package);        try std.testing.expectEqualStrings("lib/vt", workload.cwd.?);        try std.testing.expectEqualStrings("bench-bin", workload.bin.?.step);        try std.testing.expectEqualStrings("zig-out/bin/vt-bench", workload.bin.?.path);        try std.testing.expectEqual(@as(usize, 1), workload.environment.len);        try std.testing.expectEqualStrings("BENCH_FILTER", workload.environment[0].name);        try std.testing.expect(workload.supportsAllocationCounters());        try std.testing.expect(workload.supportsAllocationTrace());        try std.testing.expectEqual(@as(f64, 10), workload.rssThresholdPercent(20));    }    try std.testing.expectEqualStrings(        "zig-out/bin/reel-vt-replay-bench",        find("reel.vt.replay").?.bin.?.path,    );    try std.testing.expectEqualStrings("bench-grid", find("vt.grid").?.step);    try std.testing.expectEqualStrings(        "bench",        find("vt.aggregate").?.localStep(),    );}test "profiling history dependencies live with current catalog owners" {    try std.testing.expectEqualSlices(        []const u8,        &.{"lib/choir"},        find("accy.choir").?.history_paths,    );    for (workloads) |workload| {        for (workload.history_paths, 0..) |left, left_index| {            try std.testing.expect(!std.mem.eql(                u8,                left,                workload.package,            ));            for (workload.history_paths[left_index + 1 ..]) |right| {                try std.testing.expect(!std.mem.eql(u8, left, right));            }        }    }}test "SAI profiling forwards workload selection arguments" {    if (!surface.research) {        try std.testing.expect(find("sai.stage") == null);        return;    }    try std.testing.expect(find("sai.stage").?.forwards_args);}test "profiling standard workloads declare direct benchmark binaries" {    for (workloads) |workload| {        if (!workload.includedIn(.standard)) continue;        const bin = workload.bin orelse return error.TestUnexpectedResult;        try std.testing.expect(std.mem.endsWith(u8, bin.step, "bin"));        try std.testing.expect(std.mem.startsWith(u8, bin.path, "zig-out/bin/"));    }    const mprompt_bin = find("mprompt.smoke").?.bin.?;    try std.testing.expectEqualSlices(        []const u8,        &.{ "--workers", "128", "--requests", "5000", "--stack-kb", "16" },        mprompt_bin.args,    );    const wasm_bin = find("choir.wasm-emitter").?.bin.?;    try std.testing.expectEqualStrings("bench-bin", wasm_bin.step);    try std.testing.expectEqualSlices([]const u8, &.{ "--suite", "wasm" }, wasm_bin.args);    try std.testing.expectEqualStrings("choir-versus-bench-bin", find("choir.versus.compile").?.bin.?.step);}test "Chic family catalog installs independent artifacts and keeps Host with Presence" {    const entries = [_]struct { name: []const u8, family: []const u8 }{        .{ .name = "chic.engine", .family = "engine" },        .{ .name = "chic.turn", .family = "turn" },        .{ .name = "chic.lifecycle", .family = "lifecycle" },        .{ .name = "chic.journal", .family = "journal" },        .{ .name = "chic.recovery", .family = "recovery" },        .{ .name = "chic.realm_isolation", .family = "realm-isolation" },        .{ .name = "chic.overload", .family = "overload" },        .{ .name = "chic.facet", .family = "facet" },        .{ .name = "chic.presence", .family = "presence" },        .{ .name = "chic.authority", .family = "authority" },        .{ .name = "chic.dispatch", .family = "dispatch" },        .{ .name = "chic.host", .family = "presence" },    };    inline for (entries) |entry| {        const workload = find(entry.name).?;        const binary = workload.bin.?;        try std.testing.expectEqualStrings("bench-" ++ entry.family ++ "-bin", binary.step);        try std.testing.expectEqualStrings(            "zig-out/bin/chic-bench-" ++ entry.family,            binary.path,        );        const command = if (comptime std.mem.eql(u8, entry.name, "chic.host"))            "chic-host"        else            "chic-" ++ entry.family;        try std.testing.expectEqualStrings(command, workload.localStep());    }    try std.testing.expectEqualStrings(        "zig-out/bin/chic-bench",        find("chic.bench").?.bin.?.path,    );}

Source: src/profiling/root.zig:11

zig
pub const catalog = @import("catalog.zig");

Complete caller list for catalog.find

35 direct callers.

Complete call list for catalog.resolveRuntime

8 direct calls.

Audit

Definitions52
Public names52
Members58
Version26.7.0
Revisiondaab053ee433