Skip to content

Add perf comparison: setup-java v5.3.0 (CommonJS) vs main (ESM)#4

Open
brunoborges wants to merge 4 commits into
mainfrom
brunoborges-setup-java-perf-comparison
Open

Add perf comparison: setup-java v5.3.0 (CommonJS) vs main (ESM)#4
brunoborges wants to merge 4 commits into
mainfrom
brunoborges-setup-java-perf-comparison

Conversation

@brunoborges

Copy link
Copy Markdown
Owner

What

New workflow perf-compare.yml that benchmarks setup-java v5.3.0 (last CommonJS release, commit ad2b381) against main (now ESM, refreshed deps + cache/logging enhancements, commit fe9b749). Both declare using: node24, so this isolates the effect of the ESM rewrite + dependency bumps + cache handling on real setup time.

How it measures

Identical scenario (Temurin 21 + Maven build) run per OS (Ubuntu / Windows / macOS) and per version, in two phases:

  • COLD — build-tool cache is guaranteed empty (the cache key embeds github.run_id), so setup-java restores nothing and saves the cache in post.
  • WARMneeds: cold, so the cache saved by COLD is restored (cache-hit=true). WARM vs COLD shows the cache benefit; v5.3.0 vs main shows the version delta.

Captured per leg:

  • setup_ms — wall-clock of the setup-java step, bracketed with Date.now() from the runner's node (portable across all three OSes).
  • cache_hit — the action's Maven cache-hit output.
  • m2_kb — size of ~/.m2/repository (cache footprint).

The compare job aggregates all metrics artifacts and writes two tables to the run summary: raw measurements, and a v5.3.0 vs main delta per OS + phase.

Notes

  • Temurin 21 is used deliberately — it is pre-provisioned in the runner tool-cache on all three OSes, so JDK "download" is a low-variance local copy and timing reflects the action's own overhead + caching rather than network noise.
  • Timings include ~sub-second inter-step overhead and vary run-to-run; read the trend across OSes / re-runs.

Open the workflow run's Summary to see the comparison tables.

brunoborges and others added 4 commits July 8, 2026 14:46
Measures setup-java step wall-time, cache-hit, and .m2 cache size across
Ubuntu/Windows/macOS in cold (cache miss + save) and warm (cache restore)
phases, then prints a side-by-side comparison table to the job summary.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
….0.0)

Parallels perf-compare.yml but pins the CommonJS leg to v5.5.0 (0f481fc)
and the ESM leg to current main (f848fd1, v6.0.0).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Decomposes setup-java warm time into T_nocache (bootstrap+JDK) and
T_restore (cache download+extract) for v5.5.0 vs main, with
ACTIONS_STEP_DEBUG enabled on warm jobs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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