Skip to content

Write the performance results JSON from the test, as common-ci expects - #136

Merged
Automation51D merged 1 commit into
mainfrom
fix/performance-results-json
Sep 16, 2026
Merged

Automation51D merged 1 commit into
mainfrom
fix/performance-results-json

Conversation

@YaroslavVlasenko

Copy link
Copy Markdown
Contributor

Why: 51Degrees/common-ci#230 changed the Java performance adapter. java/run-performance-tests.ps1 now passes -Dfiftyone.performance.json=<file> to Maven and expects the test itself to write the results JSON, which it then validates and publishes with steps/publish-performance-results.ps1. It no longer copies the surefire output into test-results/performance-summary, and REPO_SCRIPTS.md now says a repository script must not scrape a figure from console output. ShareUsageOverheadTests wrote no such file, so every leg of the nightly has failed on the performance step since 2026-09-15 with "The performance example did not produce 'results_.json'".

What changes

  • ShareUsageOverheadTests records both overheads and, in @AfterAll, writes them to the file named by fiftyone.performance.json. When the property is not set, as in local runs and the unit-test step, it writes nothing.
  • The metric names ShareUsageOverhead_SingleEvidence_ms and ShareUsageOverhead_HundredEvidence_ms are unchanged, so the graph history stays continuous.
  • ci/run-performance-tests.ps1 only delegates to the common script now. The scraping block was dead: the common script exits before reaching it, and publishing happens there.

How it was verified

Ran pipeline-java/ci/run-performance-tests.ps1 from a checkout of common-ci main, laid out the way the workflow does it. Before the change it fails with the same message as the nightly. After it, the common script prints Published 2 metric(s) and exits 0, and the test class still passes when run without the property.

The Java performance adapter in common-ci now hands the test a file path
and expects the test to write the results JSON itself. ShareUsageOverheadTests
records both overheads and writes them out at the end of the class. The
scraping block in ci/run-performance-tests.ps1 goes, since the common script
publishes the file on its own.
@Automation51D
Automation51D merged commit 2c731e2 into main Sep 16, 2026
27 of 31 checks passed
@Automation51D
Automation51D deleted the fix/performance-results-json branch September 16, 2026 10:09
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.

3 participants