Skip to content

Document the path from a capture to what to optimize - #13

Merged
lhotari merged 1 commit into
mainfrom
readme-0.5.0
Sep 23, 2026
Merged

lhotari merged 1 commit into
mainfrom
readme-0.5.0

Conversation

@lhotari

@lhotari lhotari commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Top of the 0.5.0 correlator stack (GitHub stack #15; spec: readme-0.5.0.md). Based on #12 (top/summarize).

What changes (README)

  • Correlate step: --estimate-population true, with the reason (the broker's busy slice is 49.0 s observed vs 101.4 s estimated). Useful on real captures once Account for counted sequence contention in population estimates #9 lands.
  • New "Other views of the same recording": a converter view per configured asyncProfilerOptions event, and --collapsed-input for them.
  • New step 6 "Find what to optimize": top by boundary and blocker, the idle table and over-exclusion line, a trimmed flame graph with --root-at + --collapse-leaf, and top --baseline. The fixture's top three rows serve as the example.
  • New "Analyzing with AI agents", "Analyzing with SQL" (both DuckDB recipes on the 0.5.0 export, --run-label, --run-metadata, the estimated-weights caveat) and "Example: Apache Pulsar".
  • The "Correlator options" table points to help <command> as the reference.
  • OFFLINE.md parts of the spec (transform order, digest schema v1, export fields and --run-metadata) landed with Add frame-level stack transforms to stacks #10, Add top and summarize: ranked tables and an analysis digest #12 and Make export friendlier to SQL #11.

Verification

  • ./gradlew spotlessCheck :jonoffcpu-correlator:check -PjonoffcpuFixtures=… passes. CommandLineTest's README check now also covers step 6, the AI agents section and the SQL section, so every option they name must exist in the parser.
  • The new sections' correlator commands were run as written against the fixture profile (top, top --baseline, stacks … --root-at … --collapse-leaf-from …, stacks --collapsed-input, export, summarize). The SQL recipes reproduce the stated numbers in DuckDB 1.5.5; that is also covered by ExportTest/testFixtureAcceptance in Make export friendlier to SQL #11.
  • The jfr-converter rendering commands were not run here.

Deviations

  • Version coordinates stay at 0.4.0. The release workflow's "Update README version numbers" step already rewrites both places (the Pass a tag such as line and the three Gradle coordinates) after a release. Changing them now would point readers at an unpublished 0.5.0.
  • The Pulsar case study doesn't link to the Pulsar launcher docs or the lhotari/pulsar PR yet: neither the lh-use-jonoffcpu-profiler branch nor a PR is public. Add the links once they are.
  • Step 6's Pulsar example states the extra BookKeeper idle line it uses. With preset:jvm-idle alone, BookKeeper's internalTakeAll idle loop would top the table.

@lhotari
lhotari added this pull request to stack #14 September 23, 2026 20:16
@lhotari
lhotari removed this pull request from stack #14 September 23, 2026 20:17
@lhotari
lhotari added this pull request to stack #15 September 23, 2026 20:22
@lhotari
lhotari force-pushed the readme-0.5.0 branch 2 times, most recently from 7bd3c7a to 7dd76f0 Compare September 23, 2026 20:37
Base automatically changed from top-and-digest to main September 23, 2026 20:37
The README explained capture, correlation and slicing, and stopped at
"open offcpu.html". It now continues to the answer:

- Correlate step: --estimate-population true, and why comparisons need it
  (a Pulsar broker's busy waits: 49.0 s observed, 101.4 s estimated).
- "Other views of the same recording": which converter views the agent's
  JFR supports, only for events that asyncProfilerOptions configured, and
  that stacks/top --collapsed-input apply to them.
- Step 6, "Find what to optimize": top by application boundary with its
  blocker, the idle table and the over-exclusion line, a trimmed flame
  graph with --root-at and --collapse-leaf, and top --baseline for two
  runs, with the Pulsar broker's top rows as the example.
- "Analyzing with AI agents": start from jonoffcpu-summary.md, drill down
  with top --format json, stacks and export, and never hand over the raw
  capture or JFR.
- "Analyzing with SQL": the DuckDB boundary ranking and two-run comparison
  on the 0.5.0 export, --run-label and --run-metadata.
- "Example: Apache Pulsar": the numbers that motivated this work, and why
  a glibc image is needed for the time without an application frame.
- The correlator options table now points at the generated help.

CommandLineTest's README check now also covers the new sections, so every
option they name must exist in the parser. The version coordinates stay
at 0.4.0: the release workflow rewrites both places on release.
@lhotari
lhotari merged commit 13121c7 into main Sep 23, 2026
@lhotari
lhotari deleted the readme-0.5.0 branch September 24, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant