Skip to content

Stabilize compiler and linter benchmark measurements - #5739

Open
Timothee Guerin (timotheeguerin) wants to merge 4 commits into
Azure:mainfrom
timotheeguerin:fix/benchmark-consistency
Open

Timothee Guerin (timotheeguerin) wants to merge 4 commits into
Azure:mainfrom
timotheeguerin:fix/benchmark-consistency

Conversation

@timotheeguerin

Copy link
Copy Markdown
Member

The Azure-services linter dashboard mixes changes in compiler performance with changes in workloads and machines. Its warmups also ran in processes that exited before measurement, so they never warmed the measured compiler's JIT or modules.

Keep 25 measurements + 3 warmups, but run each compiler workload in one isolated process, with a fresh Program and GC before each compilation. Emitter sampling and process isolation stay unchanged. The compiler noise gate now checks linter variability as well as total compilation time.

Pin the service corpus, published C# emitter and Ubuntu release; retain source revisions, per-worker CPU details and variability in history. Baselines only compare matching environments, using the emitter's own runner for emitter metrics. Raw points remain visible, but charts no longer connect incompatible measurements or treat unresolved compiler noise as a regression. Also restore collection by declaring the workspace @typespec/http-client peer required by the pinned C# backend.

Methodology change: new results are marked split-warm and start a separate baseline from earlier cold measurements. Existing history is not rewritten or smoothed. Shared hosted runners can still vary; a dedicated BENCHMARK_RUNNER is needed for tighter hardware control.

@github-actions

Copy link
Copy Markdown
Contributor

No changes needing a change description found.

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

📦 Package size report

✅ No notable package size changes compared to the base branch.

14 package(s) with no notable change
Package Packed (base → head) Δ Packed Unpacked (base → head) Δ Unpacked
@azure-tools/azure-http-specs 143.53 KB → 143.53 KB — 1.20 MB → 1.20 MB —
@azure-tools/typespec-autorest 87.87 KB → 87.87 KB — 424.17 KB → 424.17 KB —
@azure-tools/typespec-autorest-canonical 7.42 KB → 7.42 KB — 26.00 KB → 26.00 KB —
@azure-tools/typespec-azure-core 136.55 KB → 136.55 KB — 733.30 KB → 733.30 KB —
@azure-tools/typespec-azure-examples 80.15 KB → 80.15 KB — 383.36 KB → 383.36 KB —
@azure-tools/typespec-azure-portal-core 36.28 KB → 36.28 KB — 242.88 KB → 242.88 KB —
@azure-tools/typespec-azure-resource-manager 201.90 KB → 201.90 KB — 1.21 MB → 1.21 MB —
@azure-tools/typespec-azure-rulesets 5.94 KB → 5.94 KB — 35.11 KB → 35.11 KB —
@azure-tools/typespec-client-generator-core 249.45 KB → 249.45 KB — 1.32 MB → 1.32 MB —
@azure-tools/typespec-go 264.28 KB → 264.28 KB — 1.35 MB → 1.35 MB —
@azure-tools/typespec-java 20.22 MB → 20.22 MB — 22.52 MB → 22.52 MB —
@azure-tools/typespec-metadata 15.88 KB → 15.88 KB — 62.08 KB → 62.08 KB —
@azure-tools/typespec-python 42.58 KB → 42.58 KB — 166.02 KB → 166.02 KB —
@azure-tools/typespec-ts 550.66 KB → 550.66 KB — 2.75 MB → 2.75 MB —

Packed = gzipped .tgz published to npm. Unpacked = total extracted size. 🆕 added, 🗑️ removed. Packages from the core/ submodule are not included.
🔴 grew · 🟢 shrank — only changes of at least 512 B and 0.5% are marked.

@timotheeguerin

Copy link
Copy Markdown
Member Author

Completed the local cold-process versus warmed-process runtime comparison with the same pinned service inputs and 25 measured compilations + 3 warmups:

Compiler workload Previous processes Warmed process Observed reduction
Compute (median of 3 workload runs) 79.6 s 61.2 s 23%
Network (1 paired workload run) 158.2 s 143.6 s 9%
Web (1 paired workload run) 127.1 s 81.7 s 36%

These are local macOS / Node 26 observations, not controlled CI measurements or a promised speedup. The machine was shared, and the Compute runs overlapped other development checks. Noise retries were disabled to compare the same sample counts; CI can append its configured retries. Emitter workloads were not changed or included in these times.

Warmup is not a complete cure for noise: the paired Network run's linter CV increased from 11.6% to 22.9%, while Web decreased from 28.1% to 21.6%. This is why the PR retains raw points, excludes unresolved noisy runs from compiler baseline comparisons, and documents the need for dedicated hardware rather than claiming uniformly stable measurements on shared runners.

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

You can try these changes here

🛝 Playground 🌐 Website

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

eng meta:website TypeSpec.io updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant