coldtrace is a small Rust CLI for learning Linux process/runtime behavior by tracing cold starts of ML-ish workloads.
You can find a write up about this here.
The first target workload is:
python3 -c 'import torch'Current version: 0.0.7
coldtrace is currently a direct process wrapper.
At a high level, it:
- Parses the child command after
--. - Creates a run directory under
runs/. - Starts the child process.
- Redirects the child's stdout and stderr into log files.
- Measures wall-clock time from the parent process.
- Waits for the child to exit.
- Records the child PID, exit code or signal, argv, cwd, output byte counts, and artifact paths.
- Writes everything into
record.json.
That means this:
coldtrace run -- python3 -c 'print("hello")'creates something like:
runs/
20260622T022115.254Z-python3-print-hello/
record.json
stdout.log
stderr.log
The tool is intentionally boring at this stage. It is not trying to be a profiler yet. It is building the reliable parent-process measurement foundation first.
From the Lima VM:
cd /Users/arjunpherwani/dev/coldtrace
cargo run -- run -- python3 -c 'print("hello")'With an explicit run name:
cargo run -- run --name torch-import -- python3 -c 'import torch'The CLI prints the run directory:
runs/20260622T022115.254Z-torch-import
Inspect the artifacts:
cat runs/<run-id>/stdout.log
cat runs/<run-id>/stderr.log
python3 -m json.tool runs/<run-id>/record.json