Skip to content

benchmarks: BenchmarkDiffTool test coverage + JasperReports 7 PDF export fix#133

Merged
DemchaAV merged 2 commits into
developfrom
fix/benchmarks-jasper-pdf-and-diff-tests
Jun 7, 2026
Merged

benchmarks: BenchmarkDiffTool test coverage + JasperReports 7 PDF export fix#133
DemchaAV merged 2 commits into
developfrom
fix/benchmarks-jasper-pdf-and-diff-tests

Conversation

@DemchaAV

@DemchaAV DemchaAV commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Summary

Two independent benchmarks-module changes:

  1. Fix — restore the comparative benchmark's JasperReports PDF export.
  2. Tests — cover BenchmarkDiffTool (the run-to-run comparison engine) and add a runner script.

1. fix(benchmarks): JasperReports 7 PDF export

ComparativeBenchmark#benchmarkJasper calls JasperExportManager.exportReportToPdf, which fails at runtime with Missing JasperReports PDF Extension (jasperreports-pdf-x.x.x.jar). JasperReports 7 split PDF export out of the core jar into a separate jasperreports-pdf module that was not on the classpath, so scripts/run-benchmarks.ps1 died at step 03-comparative. The current-speed suite was unaffected.

Fix: add net.sf.jasperreports:jasperreports-pdf at the same ${jasperreports.version} (7.0.7).

2. test(benchmarks): BenchmarkDiffTool coverage

Previously only BenchmarkDiffTool's file selection was tested (BenchmarkDiffToolSelectionTest); the actual comparison math was not. BenchmarkDiffToolTest drives the engine end-to-end through main() — two report JSONs in, one diffs/<suite>/latest.json out — and covers:

  • signed percent deltas — latency, throughput, comparative libraries
  • divide-by-zero contract — 0 -> 5 = +100%, 0 -> 0 = 0%
  • baseline/candidate join drops scenarios and libraries present in only one run
  • guards — profile mismatch, schema mismatch, unknown schema

Plus scripts/run-benchmark-tests.ps1 to run the benchmarks-module JUnit tests (the module is not part of the main reactor), with -Test and -Install switches.

Verification

  • ./mvnw -f benchmarks/pom.xml test -> 11/11 green (7 new + 2 selection + 2 median)
  • ComparativeBenchmark runs clean: GraphCompose ~2.4 ms / iText ~1.6 ms / JasperReports ~4.4 ms

Note

Targeted at develop (integration branch). The JasperReports bug also affects the released main line; it will reach main at the next release — a direct hotfix PR to main can be cut separately if it is needed there sooner.

DemchaAV added 2 commits June 7, 2026 09:52
…iveBenchmark

JasperReports 7 modularised PDF export out of the core jasperreports jar into a separate jasperreports-pdf extension. ComparativeBenchmark#benchmarkJasper calls JasperExportManager.exportReportToPdf, which failed at runtime with "Missing JasperReports PDF Extension (jasperreports-pdf-x.x.x.jar)" because only the core artifact was on the classpath.

Add jasperreports-pdf at the same ${jasperreports.version} (7.0.7). The current-speed suite was unaffected; only the comparative step (03-comparative in run-benchmarks.ps1) was broken.
…t runner

BenchmarkDiffToolTest exercises the diff engine end-to-end through main(): two report JSONs in, one diffs/<suite>/latest.json out. Covers signed percent deltas (latency + throughput + comparative), the divide-by-zero contract (0->5 = +100, 0->0 = 0), the baseline<->candidate join dropping one-sided scenarios/libraries, and the profile / schema-mismatch / unknown-schema guards.

run-benchmark-tests.ps1 runs the benchmarks-module JUnit tests via the Maven wrapper (the module is not part of the main reactor), with -Test and -Install switches.
@DemchaAV DemchaAV force-pushed the fix/benchmarks-jasper-pdf-and-diff-tests branch from 794d946 to f76e7d7 Compare June 7, 2026 08:52
@DemchaAV DemchaAV changed the base branch from main to develop June 7, 2026 08:53
@DemchaAV DemchaAV closed this Jun 7, 2026
@DemchaAV DemchaAV reopened this Jun 7, 2026
@DemchaAV DemchaAV merged commit b5d0e7a into develop Jun 7, 2026
10 of 11 checks passed
@DemchaAV DemchaAV deleted the fix/benchmarks-jasper-pdf-and-diff-tests branch June 7, 2026 12: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