-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.zig
More file actions
32 lines (28 loc) · 1.14 KB
/
Copy pathbuild.zig
File metadata and controls
32 lines (28 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
_ = b.addModule("typeid", .{ .root_source_file = b.path("src/typeid.zig") });
const test_step = b.step("test", "Run library tests");
const tests = b.addTest(.{
.root_module = b.createModule(.{
.root_source_file = b.path("src/typeid.zig"),
.target = target,
.optimize = optimize,
}),
});
const run_tests = b.addRunArtifact(tests);
test_step.dependOn(&run_tests.step);
// Benchmark for UUID generation (demonstrates per-generator mutex performance)
const bench_uuid = b.addExecutable(.{
.name = "bench_uuid_contention",
.root_module = b.createModule(.{
.root_source_file = b.path("src/bench_uuid_contention.zig"),
.target = target,
.optimize = optimize,
}),
});
const bench_uuid_step = b.step("bench-uuid", "Run UUID generation benchmark");
const run_bench_uuid = b.addRunArtifact(bench_uuid);
bench_uuid_step.dependOn(&run_bench_uuid.step);
}