CLI#
vbtm reads a .vbtm recording and shows where the time went, a few hundred lines at a time.
Install#
On macOS (Apple silicon) and Linux (x86_64, aarch64), the install script downloads vbtm from
the GitHub releases page and puts it in
~/.local/bin.
curl -fsSL https://github.com/yagipass/verbatime/releases/latest/download/install-cli.sh | sh -s -- -b ~/.local/bin
brew install yagipass/tap/vbtm
curl -LO https://github.com/yagipass/verbatime/releases/latest/download/verbatime-cli.jar
java -jar verbatime-cli.jar --help
nix profile install github:yagipass/verbatime#vbtm
Verifying downloads shows how to check the jar.
Find a slow call#
Start with the sessions, then narrow down. The ids one command prints are what the next one takes.
vbtm sessions rec.vbtm --sort dur # the slowest sessions, such as 7
vbtm hot rec.vbtm 7 # the methods that took the most time
vbtm tree rec.vbtm 7 # the call tree, longest calls first
vbtm tree rec.vbtm --at 7.57 # one call and everything under it
Every output is capped and ends with the command that shows more.
Commands#
| Command | What it shows |
|---|---|
sessions |
Every session with its time, calls, exceptions, GC time, thread, and root method. Start here. |
hot |
Methods ranked by self time, total time, or calls |
throws |
Exceptions, where they were thrown and caught, and how often |
tree |
The call tree of a session, or of one call with --at |
find |
Every call of a method, slowest first |
callers |
The paths that lead to a method |
vbtm --help and vbtm <command> --help list all options.
JSON output#
Every command takes --json, which prints one JSON object per line. vbtm never prompts.
| Exit status | Meaning |
|---|---|
| 0 | Success |
| 1 | Bad arguments |
| 2 | The file cannot be read, or is not a recording |
| 3 | The file is corrupt. What could be read is still printed. |
With an AI agent#
skills/vbtm/ is an agent
skill that investigates a recording with vbtm. Add it to your agent with one of these commands,
and ask why a request was slow.
gh skill install yagipass/verbatime vbtm
npx skills add yagipass/verbatime --skill vbtm
apm install yagipass/verbatime/skills/vbtm
A recording holds class, method, thread, and exception names, GC pauses, and timings. It holds no argument values, return values, or exception messages.