Repository navigation
fix: 🐛 Avoid duplicate profile capture resume scans - #83
Merged
Merged
Conversation
Contributor
|
Linux CI: success · Commit Test results (Linux)
Test coverage
Includes the test JVM and CLI subprocesses. Excludes optional real-Collector smoke tests. Workflow logs and report artifacts Updated on each CI run. Windows checks, when required, are reported separately in the workflow. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Each incomplete profile-capture resume validated every committed page, then read and decoded the same pages again to collect transaction IDs. Repeated 40-page invocations increased local preparation work without downloading those committed profiles again.
Refs #74
Changes
resumeReadCheckwith reproducible counts, bytes, scan histograms, preparation/capture timing and implementation class fingerprints. The existing-PcliJar=...Gradle property selects a baseline JAR for comparison; no CLI flags are added.Validation
Synthetic measurement
Linux/WSL2, JDK 21, 512 MiB maximum heap; three fresh JVM trials per version, real
EvidenceStore, synthetic profiles and no Collector/network delay. Each workload captures 120 pages in three 40-page application invocations, then resumes the completed capture. Workloads use 2 or 100 records/page with 20 small structural SQL steps/profile. All generated page fingerprints match between versions and trials.Ordinary existing-prefix scans change from 0, 80, 160 to 0, 40, 80. The two incomplete resumes read 240 → 120 existing pages. The completed-resume control still validates all 120 pages once in both versions; committed profiles are not fetched again.
Medians for the 100-record/page workload:
Run
./gradlew --no-daemon resumeReadCheckto generate a new report and raw JFR recordings. See measurement instructions for baseline comparison and metric definitions.This halves ordinary prefix scans while cumulative work across separate invocations remains quadratic. Recovery can reread unavailable-profile pages. The application ID set and store uniqueness set are now live together during validation; peak heap was not measured. Timings exclude JVM startup and recorder start/dump/stop, retain event overhead, and do not control cache, JIT, GC, contention or candidate order. They do not establish production throughput, native Windows/macOS performance or a universal latency improvement.