Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/startup-benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Startup benchmark
on:
pull_request:
paths:
- 'src/**'
- 'Directory.*'
- 'scripts/benchmark_startup.py'
- '.github/workflows/startup-benchmark.yml'
workflow_dispatch:
inputs:
baseline_ref:
description: Baseline commit or tag to publish with the same SDK
required: true
default: 26f64b9f864348e51684bf68f49095f151a3ba27
permissions:
contents: read
concurrency:
group: startup-${{ github.ref }}
cancel-in-progress: true
jobs:
measure:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
path: candidate
persist-credentials: false
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
path: baseline
ref: ${{ inputs.baseline_ref || github.event.pull_request.base.sha }}
persist-credentials: false
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6
with:
dotnet-version: 10.0.x
- name: Publish and compare isolated native bundles
shell: pwsh
run: |
$prefix = if ($IsWindows) { 'win' } elseif ($IsMacOS) { 'osx' } else { 'linux' }
$rid = "$prefix-$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())"
$binary = if ($IsWindows) { 'spn.exe' } else { 'spn' }
dotnet --info > sdk-info.txt
foreach ($source in @('baseline', 'candidate')) {
dotnet publish "$source/src/SidePulse.Cli" -c Release -r $rid --self-contained true -p:NuGetLockFilePath=obj/packages.publish.lock.json -o "$source/published"
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
}
$before = git -C baseline rev-parse HEAD
$after = git -C candidate rev-parse HEAD
python candidate/scripts/benchmark_startup.py "baseline/published/$binary" --samples 9 --label $before --output baseline.json
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
python candidate/scripts/benchmark_startup.py "candidate/published/$binary" --samples 9 --label $after --output candidate.json --compare baseline.json
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
- name: Upload measurements and build environment
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: startup-${{ runner.os }}
path: |
baseline.json
candidate.json
sdk-info.txt
retention-days: 30
121 changes: 121 additions & 0 deletions docs/performance/2026-10-26-linux-baseline.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{
"schema_version": 1,
"label": "26f64b9-baseline",
"platform": "Linux-6.18.55-x86_64-with-glibc2.41",
"architecture": "x86_64",
"processor": "",
"logical_cpus": 3,
"python": "3.12.14",
"executable_sha256": "9d3ea52f7fc8d22e2dff491cb1747514643db799da489b04b70fe956c58a48c7",
"executable_bytes": 76610475,
"executable_gzip_bytes": 33159265,
"extracted_bytes": 0,
"extracted_files": [],
"samples_per_mode": 9,
"results": {
"version": {
"empty_bundle_cache": {
"samples_ms": [
148.98,
127.45,
142.65,
138.52,
136.94,
124.39,
136.71,
127.36,
136.07
],
"median_ms": 136.71,
"min_ms": 124.39,
"max_ms": 148.98
},
"cached_bundle": {
"samples_ms": [
127.5,
130.29,
125.13,
134.55,
137.77,
145.04,
140.88,
133.7,
125.39
],
"median_ms": 133.7,
"min_ms": 125.13,
"max_ms": 145.04
}
},
"state_preview": {
"empty_bundle_cache": {
"samples_ms": [
162.0,
155.58,
163.04,
172.06,
172.45,
163.97,
185.22,
170.78,
175.74
],
"median_ms": 170.78,
"min_ms": 155.58,
"max_ms": 185.22
},
"cached_bundle": {
"samples_ms": [
171.82,
173.08,
168.58,
163.84,
175.19,
172.55,
179.07,
184.86,
170.26
],
"median_ms": 172.55,
"min_ms": 163.84,
"max_ms": 184.86
}
},
"home": {
"empty_bundle_cache": {
"samples_ms": [
514.89,
457.32,
455.02,
450.45,
467.5,
455.27,
465.33,
450.49,
449.22
],
"median_ms": 455.27,
"min_ms": 449.22,
"max_ms": 514.89
},
"cached_bundle": {
"samples_ms": [
450.8,
449.66,
469.67,
455.02,
453.06,
464.61,
538.6,
512.48,
524.06
],
"median_ms": 464.61,
"min_ms": 449.66,
"max_ms": 538.6
}
}
},
"home_measurement": "Unix PTY at 100x30, first complete Home input guide",
"limits": "Empty bundle cache is not cold OS page cache. Alternating cold/warm runs; no hardware or bridge delivery. Times include process startup, not just managed Main. gzip bytes are executable-only, not the complete release archive."
}
121 changes: 121 additions & 0 deletions docs/performance/2026-10-26-linux-compressed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{
"schema_version": 1,
"label": "26f64b9-compressed",
"platform": "Linux-6.18.55-x86_64-with-glibc2.41",
"architecture": "x86_64",
"processor": "",
"logical_cpus": 3,
"python": "3.12.14",
"executable_sha256": "095ca7500b081bbd2686d2aef8ca7d7b751d951edb925b7a5aec83881538ffe8",
"executable_bytes": 40573373,
"executable_gzip_bytes": 33397573,
"extracted_bytes": 0,
"extracted_files": [],
"samples_per_mode": 9,
"results": {
"version": {
"empty_bundle_cache": {
"samples_ms": [
225.33,
213.58,
196.03,
205.14,
194.69,
211.46,
209.51,
210.05,
194.09
],
"median_ms": 209.51,
"min_ms": 194.09,
"max_ms": 225.33
},
"cached_bundle": {
"samples_ms": [
204.52,
193.42,
207.66,
211.3,
202.99,
197.75,
193.89,
204.02,
206.18
],
"median_ms": 204.02,
"min_ms": 193.42,
"max_ms": 211.3
}
},
"state_preview": {
"empty_bundle_cache": {
"samples_ms": [
232.05,
238.23,
244.81,
468.24,
290.1,
247.22,
233.8,
239.64,
413.73
],
"median_ms": 244.81,
"min_ms": 232.05,
"max_ms": 468.24
},
"cached_bundle": {
"samples_ms": [
250.4,
242.64,
467.02,
310.57,
287.94,
242.27,
240.89,
348.84,
266.28
],
"median_ms": 266.28,
"min_ms": 240.89,
"max_ms": 467.02
}
},
"home": {
"empty_bundle_cache": {
"samples_ms": [
542.57,
509.71,
534.39,
508.87,
533.97,
527.29,
519.1,
511.95,
560.07
],
"median_ms": 527.29,
"min_ms": 508.87,
"max_ms": 560.07
},
"cached_bundle": {
"samples_ms": [
589.7,
527.65,
524.56,
528.51,
555.26,
527.4,
515.02,
522.36,
524.96
],
"median_ms": 527.4,
"min_ms": 515.02,
"max_ms": 589.7
}
}
},
"home_measurement": "Unix PTY at 100x30, first complete Home input guide",
"limits": "Empty bundle cache is not cold OS page cache. Alternating cold/warm runs; no hardware or bridge delivery. Times include process startup, not just managed Main. gzip bytes are executable-only, not the complete release archive."
}
Loading
Loading