Skip to content

Reporting validation and performance

Validated locally on 7 November 2026 using Docker Desktop 29.8.2 and disposable Oracle Free 23 containers. No production database was accessed. The benchmark test JVM has a 1 GiB maximum heap; Docker reported 9,945 MB available. JaCoCo is disabled for the performance task.

Repeatable commands

Run from the repository root with Docker available:

.\gradlew.bat :cis-api:test --tests 'com.dw.ngms.cis.reporting.*' --tests 'com.dw.ngms.cis.service.report.ReportingServiceTest'
.\gradlew.bat :cis-api:integrationTest --tests 'com.dw.ngms.cis.reporting.*'
.\gradlew.bat :cis-api:jacocoReportingReport -x :cis-api:test -x :cis-api:integrationTest
.\gradlew.bat :cis-api:reportingPerformanceTest --rerun-tasks

The coverage command consumes the preceding executions. Performance tests are opt-in and excluded from the normal integration task. Docker is mandatory for the performance task. --rerun-tasks prevents Gradle from returning cached/up-to-date measurements.

Functional verification

  • 201 reporting and ReportingService unit tests passed.
  • 10 Oracle-backed reporting integration tests passed, with no skipped tests: job persistence (3), HTTP contracts (5), Maintenance query adapters (2).
  • Verified job admission under concurrent transactions, claim fencing, expired-lease recovery, cancellation, artifact ownership/expiry, submit/poll/download HTTP flow, grant revocation, legacy-form compatibility, and synchronous PDF output.
  • Combined reporting coverage: 2,354 / 3,295 lines (71.4%); 861 / 1,556 branches (55.3%). This is not complete coverage.

The Maintenance query checks exercise the real Oracle syntax with an empty authorized scope. They do not establish business aggregation correctness on representative production records.

Benchmark method

ReportingPerformanceTest runs one warmup followed by three measured samples for each scenario. Durations exclude container startup, schema initialization, connection acquisition, output validation, and artifact deletion. Each artifact is deleted after verification. There are no timing assertions tied to workstation speed.

  • Oracle to background CSV: generate 100,000 numbered technical rows using Oracle CONNECT BY, fetch 250 rows per round trip, map to the 12-column User Summary projection, and write through the actual asynchronous CSV writer. Verify the header and row count. This includes row creation, JDBC fetching, annotation mapping, escaping, and disk output.
  • User Summary PDF: render 2,000 technical rows through the real User Summary Thymeleaf template, approved image loader, Flying Saucer renderer, and file writer. Parse the resulting PDF and verify it has multiple pages. This includes template processing, layout, and PDF writing.

Final measured samples (both benchmark tests passed; none skipped):

Scenario Rows Sample 1 Sample 2 Sample 3 Artifact bytes
Oracle to CSV 100,000 1,202.29 ms 941.00 ms 1,013.62 ms 16,277,920
User Summary PDF 2,000 3,014.11 ms 1,181.75 ms 1,135.29 ms 1,382,835

The CSV median was about 98,656 rows/second. PDF layout was the largest measured rendering stage. Three samples provide a local baseline, not a statistically reliable tail-latency estimate.

Production performance checks still required

These synthetic single-export measurements do not exercise actual report SQL plans, production row widths/distribution, worker queue delay, BLOB publication/download throughput, peak heap, multiple instances, or concurrent maximum-size exports. Before capacity sign-off, measure those paths on a representative anonymized staging dataset with production indexes and resource limits. Capture query plans, p50/p95/p99 end-to-end latency, peak heap/GC, database pool utilization, temporary disk use, and queue age at the intended concurrency. Retain the current export and PDF bounds until that evidence supports changing them.