feat(benchmarks): opt-in benchmark logging flag#355
Merged
Conversation
Benchmark runs are quiet by default so GraphCompose, PDFBox, and FontBox DEBUG lifecycle logs don't distort the measured numbers or bury the metrics. Opt back into those logs when debugging a run: `-EnableBenchmarkLogs` on run-benchmarks.ps1, or `-Dgraphcompose.benchmark.logging=debug` on a direct Java entry point. BenchmarkSupport reads graphcompose.benchmark.logging (default quiet; debug/verbose/true/on enable logs): quiet installs logback-benchmark.xml (ERROR-only), otherwise logging stays at the default. This adds the logback-benchmark.xml resource that BenchmarkSupport already referenced but that was missing from the tree, so quiet mode now actually applies. The script threads the property through every benchmark step; BenchmarkSupportTest covers the default-quiet and opt-out paths.
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.
Why
Benchmark runs print GraphCompose, PDFBox, and FontBox DEBUG lifecycle logs, which
distort the measured timings and bury the metrics in the step logs and console mirror.
Perf runs should be quiet by default, with logs available on demand when debugging a run.
What
run-benchmarks.ps1gains-EnableBenchmarkLogs, which sets-Dgraphcompose.benchmark.logging=quiet|debugand threads it through every benchmarkstep (current-speed, comparative, stress, endurance, diffs, median aggregation, verdict).
BenchmarkSupportreadsgraphcompose.benchmark.logging(defaultquiet;debug/verbose/true/onenable logs): quiet installs the ERROR-onlylogback-benchmark.xml, otherwise logging is left at the default.logback-benchmark.xml— the resourceBenchmarkSupportalready referenced butwhich was missing from the tree, so the quiet path was previously a no-op; it now applies.
BenchmarkSupportTestcovering the default-quiet and opt-out (debug/true) paths.docs/operations/benchmarks.mdand linked the benchmarks doc fromthe README.
Tests
./mvnw -f aggregator/pom.xml test -pl :graph-compose-build -am -Dtest=BenchmarkSupportTest→
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0.Benchmark-harness tooling only — no engine, public API, or rendered-output change.