Skip to content

feat(benchmarks): opt-in benchmark logging flag#355

Merged
DemchaAV merged 1 commit into
2.0-devfrom
feat/benchmark-logging-flag
Jul 10, 2026
Merged

feat(benchmarks): opt-in benchmark logging flag#355
DemchaAV merged 1 commit into
2.0-devfrom
feat/benchmark-logging-flag

Conversation

@DemchaAV

Copy link
Copy Markdown
Owner

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.ps1 gains -EnableBenchmarkLogs, which sets
    -Dgraphcompose.benchmark.logging=quiet|debug and threads it through every benchmark
    step (current-speed, comparative, stress, endurance, diffs, median aggregation, verdict).
  • BenchmarkSupport reads graphcompose.benchmark.logging (default quiet;
    debug / verbose / true / on enable logs): quiet installs the ERROR-only
    logback-benchmark.xml, otherwise logging is left at the default.
  • Added logback-benchmark.xml — the resource BenchmarkSupport already referenced but
    which was missing from the tree, so the quiet path was previously a no-op; it now applies.
  • Added BenchmarkSupportTest covering the default-quiet and opt-out (debug / true) paths.
  • Documented the switch in docs/operations/benchmarks.md and linked the benchmarks doc from
    the 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.

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.
@DemchaAV DemchaAV merged commit 0b44994 into 2.0-dev Jul 10, 2026
10 checks passed
@DemchaAV DemchaAV deleted the feat/benchmark-logging-flag branch July 10, 2026 13:16
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