No description
Find a file
2025-09-11 21:49:06 -04:00
src add c exports 2025-09-11 21:49:06 -04:00
.gitignore add c exports 2025-09-11 21:49:06 -04:00
anne_profiler.h add c exports 2025-09-11 21:49:06 -04:00
build.zig add c exports 2025-09-11 21:49:06 -04:00
build.zig.zon update build.zig.zon missing values 2025-09-10 18:53:52 -04:00
Jenkinsfile jenkinsfile 2025-09-10 18:43:25 -04:00
LICENSE init 2025-09-10 18:42:05 -04:00
README.md init 2025-09-10 18:42:05 -04:00

Zig Profiler

A simple thread profiler for zig.

Inspired by https://crates.io/crates/thread_profiler .

Compatible with chrome://tracing .

Usage

  1. Add to your build.zig.zon dependencies.
  2. Add to your import modules in build.zig.
// create the profiler
var profiler = Profiler{};
defer profiler.deinit(std.testing.allocator);

const scope = profiler.startScope("test_range");
// do things here during the scope
profiler.endScope(std.testing.allocator, scope);

// save results to a writer (tsv file, buffer, etc...)
var writer = ...;
try profiler.save(&writer);