whatisgithub

What is coz?

plasma-umass/coz — explained in plain English

Analysis updated 2026-06-26

4,491CAudience · developerComplexity · 3/5Setup · moderate

In one sentence

Coz is a profiler for C, C++, and Rust programs that predicts which functions are actually worth optimizing by running experiments to show how much faster your whole program would get if you sped up each specific part.

Mindmap

mindmap
  root((coz profiler))
    What it does
      Causal profiling
      Predicts speedups
    How it works
      Progress points
      Virtual speedup
      Live experiments
    Supported languages
      C and C++
      Rust
      Java Go Swift
    Output
      coz plot viewer
      AI suggestions
    Audience
      Performance engineers
      Systems developers
Click or tap to explore — scroll the page freely

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

What do people build with it?

USE CASE 1

Find which function in a slow C++ server is the real bottleneck worth fixing, not just the one that uses the most CPU time.

USE CASE 2

Get a prediction like 'speeding up this function by 20% would make the whole program 15% faster' before spending time on an optimization.

USE CASE 3

Profile a Rust program's throughput to see which code paths limit how many requests per second it handles.

USE CASE 4

Use the AI assistant in the coz plot viewer to get specific code change suggestions based on profiling results.

What is it built with?

CC++Rust

How does it compare?

plasma-umass/cozf5oeo/rpitxxroche/httrack
Stars4,4914,4884,487
LanguageCCC
Setup difficultymoderatemoderateeasy
Complexity3/53/52/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Requires building your program with debug symbols and adding progress point markers to your source code before profiling.

So what is it?

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.

Copy-paste prompts

Prompt 1
I have a C++ HTTP server and want to use Coz to find the real bottleneck. Walk me through adding a progress point to the request handler and running the causal profiler.
Prompt 2
Explain what a Coz progress point is and where in my Rust server code I should place one to measure request latency versus throughput.
Prompt 3
I ran Coz on my program and got a profile. How do I interpret the coz plot output to decide which optimization will give the biggest end-to-end speedup?

Frequently asked questions

What is coz?

Coz is a profiler for C, C++, and Rust programs that predicts which functions are actually worth optimizing by running experiments to show how much faster your whole program would get if you sped up each specific part.

What language is coz written in?

Mainly C. The stack also includes C, C++, Rust.

How hard is coz to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is coz for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.