Add basic coz integration - #3498
Open
bluesillybeard wants to merge 4 commits into
Open
Conversation
bluesillybeard
marked this pull request as ready for review
August 7, 2026 23:55
Author
|
aw dang, CI failed. I'll look into this at a later time/date. |
Member
|
Oh yeah, I remember seeing the talk about this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In case you aren't aware, Coz is a native profiling tool. Coz has a number of benefits over a traditional profiler, you can look for those elsewhere, such as their github page: link.
In the end, Coz will generate some graphics that look like this, which relate the speedup of a line of code with relation to how it should speed up progress points (such as the frame time measured by mainLoop or how quickly chunk meshes are generated:

This PR was created mainly just "for fun", I wanted to see how easy / difficult it would be to integrate Coz into an existing project written in Zig. In total it took me about 5 hours. Most of that time spent looking into how Coz works under-the-hood, and much of the time was 'wasted' waiting for Coz to collect data only to later realize it wasn't working.
If you want to try this out, make sure to install Coz from their releases page or by building it from source. The version of Coz packaged by your OS may or may not be up to date. Coz only supports Linux and MacOS, and this particular integration only supports Linux.
This is not complete per se, but I figured I would submit a PR regardless, in the event anyone is interested.