poopie
kALLEBALIK/poopie
NOASSERTION
A benchmarking library.
0 0 0 0
1
zig-package
build.zig.zon
build.zig
View on Github
kALLEBALIK/poopie
A benchmarking library.
var poopie: Poopie = .{
.config = .{
.store_result = true,
.compare_mode = .slowest,
},
};
var sampler = try poopie.createSampler(allocator, .{ .warmups = 100, .samples = 1000 });
defer sampler.deinit();
sampler.start();
while (sampler.sample()) : (sampler.store()) {
//
// Some code to test
//
}
_ = try poopie.collect(allocator, &sampler, .{ .name = "MyBench" });
You can overwrite poopie settings in each collection if you want
_ = try poopie.collect(allocator, &sampler, .{ .name = "MyBench", .compare_mode = .fastest });
or compare against a specific file
_ = try poopie.collect(allocator, &sampler, .{
.name = "MyBench",
.compare_mode = .file,
.compare_file = "MyBench_10_100070223.1_1726867407409043.json",
});
Stores benchmarks in .benchmark folder if store_result == true
(false by default).
This shitty library is just crappy code slapped on top of Andrew's (and contributors) awesome poop code.