How plasma-umass/coz works
Coz instruments progress points in an application, samples execution, runs causal delay experiments, and writes profiles for inspection in the browser. The native runtime is the central implementation; language bindings expose progress-point APIs, while the viewer presents results and documents AI-assisted suggestions. The README also describes latency profiling and throughput profiling. Source excerpts show runtime initialization, profiler coordination, and progress-point interfaces; several platform and binding connections are inferred only at the product level and are marked unverified.
Main entry points: profiler.cpp Causal profiler · coz.h Progress API · inspect.cpp Binary inspection · profile.ts Profile parsing
Components 18
Instrumentation
- Progress API
include/coz.h
Native runtime
- Progress points
libcoz/progress_point.h - Runtime bootstrap
libcoz/libcoz.cpp - Causal profiler
libcoz/profiler.cpp - Platform sampling
libcoz/perf.cpp - macOS sampling
libcoz/perf_macos.cpp
Profile analysis
- Binary inspection
libcoz/inspect.cpp - Binary loader
libcoz/lief_loader.cpp - Profile output
libcoz/profiler.cpp
Profile viewer
- Profile parsing
viewer/ts/profile.ts - Interactive plots
viewer/ts/ui.ts - AI suggestions
viewer
Language bindings
- Go binding
go/coz.go - Java agent
java/agent/coz_agent.cpp - Rust binding
rust/src/lib.rs - Swift binding
swift/Sources/Coz/Coz.swift
Other components
- Profiled program
- LLM providers
Connections 17
- Profiled program → Progress API: marks progress
- Progress API → Progress points: records visits
libcoz/libcoz.cpp - Runtime bootstrap → Causal profiler: starts profiler
libcoz/libcoz.cpp - Causal profiler → Progress points: tracks points
libcoz/profiler.cpp - Causal profiler → Platform sampling: uses sampling
libcoz/profiler.cpp - Causal profiler → macOS sampling: uses sampling
libcoz/profiler.cpp - Causal profiler → Binary inspection: maps samples
libcoz/profiler.cpp - Binary inspection → Binary loader: loads binaries
libcoz/inspect.cpp - Causal profiler → Profile output: writes profile
libcoz/profiler.cpp - Profile output → Profile parsing: opens profile
- Profile parsing → Interactive plots: supplies plots
- Interactive plots → AI suggestions: requests suggestions
- AI suggestions → LLM providers: uses providers
- Go binding → Progress API: exposes progress API
- Java agent → Progress API: exposes profiling
- Rust binding → Progress API: exposes progress API
- Swift binding → Progress API: exposes progress API