explaingit

plasma-umass/coz

4,491C
This is a quick first-pass explanation. The richer sections — use-cases, tech stack, setup, prompts — are still being generated.

TLDR

Coz is a performance profiling tool for programs written in C, C++, or Rust.

Mindmap

A visual breakdown will appear here once this repo is fully enriched.

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

In plain English

Coz is a performance profiling tool for programs written in C, C++, or Rust. A profiler is a tool that helps developers figure out why a program is slow. Traditional profilers show you which functions take the most time, but this does not always tell you which functions are worth fixing. A function might take a lot of time but speeding it up might have no effect on the total time the user waits, because something else is the actual bottleneck. Coz solves this with a technique it calls "causal profiling." Instead of just measuring where time is spent, it runs small experiments during program execution: it artificially slows down other parts of the code to simulate what would happen if one specific part ran faster. The result is a prediction: "if you speed up this function by 20%, the overall program will run 15% faster." This gives developers a direct answer to the question of which optimizations are actually worth pursuing. To use it, you build your program with debug symbols (extra information that links compiled code back to your source lines), then run it under Coz with a command-line wrapper. You also add a small marker called a "progress point" to your code at a line that represents the end of a unit of work, such as when a request is completed or a transaction finishes. Coz uses that marker to measure throughput (how many units of work complete per second) or latency (how long each unit takes). The results are viewed with a built-in command called coz plot, which opens a browser-based chart showing which lines have the highest optimization potential. The viewer recently added an AI assistant that can read the profiling results and suggest specific code changes, using providers like Anthropic, OpenAI, or local models. Coz works on Linux and macOS. Community-maintained wrappers exist for Java, Go, and Swift. The underlying research was published at an academic conference in 2015 and received a Best Paper Award.

Open on GitHub → Explain another repo

← plasma-umass on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.