No description
| src | ||
| .gitignore | ||
| anne_profiler.h | ||
| build.zig | ||
| build.zig.zon | ||
| Jenkinsfile | ||
| LICENSE | ||
| README.md | ||
Zig Profiler
A simple thread profiler for zig.
Inspired by https://crates.io/crates/thread_profiler .
Compatible with chrome://tracing .
Usage
- Add to your build.zig.zon dependencies.
- 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);