Skip to content

Commit a6f1598

Browse files
committed
Add runtime performance baseline capture
1 parent 53a2a2a commit a6f1598

6 files changed

Lines changed: 411 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ behavior when the change improves security or project direction.
2222
`scripts/capture-runtime-baseline.sh` to record locked dependency trees,
2323
per-profile Pingora dependency presence, release metadata, and default
2424
release-binary size before the runtime cutover work begins.
25+
- Add `scripts/capture-runtime-performance-baseline.sh` and wire it into
26+
release-mode runtime baseline capture. It records local startup time, idle
27+
RSS/file descriptors, static HTTP latency, cache MISS/HIT latency,
28+
load-balancer route timing, keep-alive throughput, and fresh TLS connection
29+
timing.
2530
- Add `docs/pingora-dependency-exceptions.tsv` and
2631
`scripts/validate-pingora-dependency-policy.sh` so the 1.6 line has a
2732
release-gated inventory of allowed Pingora crates per official profile.

docs/release-checklist.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,12 @@ scripts/check_latest_crates.sh
4646
- During the `1.6.x` Pingora-exit line, capture the runtime baseline evidence
4747
before tagging. `check` mode records locked dependency trees and the
4848
per-profile Pingora dependency surface; `release` mode also records the
49-
default release-binary size:
49+
default release-binary size and local performance baseline:
5050

5151
```bash
5252
scripts/capture-runtime-baseline.sh check
5353
scripts/capture-runtime-baseline.sh release
54+
scripts/capture-runtime-performance-baseline.sh release
5455
scripts/validate-pingora-dependency-policy.sh check
5556
scripts/validate-runtime-fixtures.sh check
5657
```

docs/runtime-baseline.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ The generated files are:
3434
| `cargo-tree/*.txt` | Locked dependency trees for default, full, cache-edge, proxy-edge, load-balancer-edge, PHP, and privacy profiles. |
3535
| `pingora-dependency-surface.tsv` | Report-only list of Pingora crates still present per profile. |
3636
| `binary-size.tsv` | Default release binary size when release/build mode is used. |
37+
| `startup-time.tsv` | Milliseconds from process spawn to first successful local HTTP response. |
38+
| `process-idle.tsv` | Idle RSS, file-descriptor count, sample counts, and TLS availability. |
39+
| `http-latency.tsv` | Local static HTTP request timing samples. |
40+
| `cache-latency.tsv` | Local static-cache MISS/HIT timing samples and cache status headers. |
41+
| `load-balancer-latency.tsv` | Local round-robin route timing samples and observed backend labels. |
42+
| `keepalive-throughput.tsv` | Single-connection HTTP keep-alive throughput samples. |
43+
| `tls-handshake-latency.tsv` | HTTPS request timing samples that create a fresh TLS connection per sample when OpenSSL is available to generate the local certificate. |
3744

3845
The stricter release policy is tracked in
3946
[Pingora Dependency Exceptions](pingora-dependency-exceptions.tsv) and checked
@@ -43,6 +50,13 @@ by:
4350
scripts/validate-pingora-dependency-policy.sh check
4451
```
4552

53+
Release mode invokes the performance baseline automatically. To skip it for a
54+
local emergency run, set:
55+
56+
```bash
57+
FLUXHEIM_RUNTIME_BASELINE_PERFORMANCE=0 scripts/capture-runtime-baseline.sh release
58+
```
59+
4660
## Comparison Rules
4761

4862
The first `1.6.0` baseline is not a pass/fail performance benchmark. It is the
@@ -55,10 +69,10 @@ Later `1.6.x` releases should compare against this baseline as follows:
5569
- binary size: default and focused profile binaries should not grow without a
5670
release-note explanation;
5771
- behavior: smoke tests and fixture parity are stronger than raw speed numbers;
58-
- performance: startup time, idle memory, connection cost, HTTP/1.1 latency,
59-
keep-alive throughput, cache HIT/MISS latency, load-balancer selection cost,
60-
TLS handshake cost, and container image size should be added as measured TSV
61-
files before the corresponding runtime component is replaced;
72+
- performance: startup time, idle memory, file-descriptor count, HTTP/1.1
73+
latency, keep-alive throughput, cache HIT/MISS latency, load-balancer route
74+
timing, and TLS fresh-connection timing are captured by the 1.6.0 baseline;
75+
container image size should be added before container/runtime cutover work;
6276
- environment: every measurement must record enough host/toolchain information
6377
to explain differences between local developer machines, CI runners, and
6478
release builders.

release-notes/RELEASE_NOTES_1.6.0.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ remove Pingora safely in later 1.6.x releases.
1818
`scripts/capture-runtime-baseline.sh` to record locked dependency trees,
1919
per-profile Pingora dependency presence, release metadata, and default
2020
release-binary size before the runtime cutover work begins.
21+
- Added `scripts/capture-runtime-performance-baseline.sh` and wired it into
22+
release-mode runtime baseline capture. It records local startup time, idle
23+
RSS/file descriptors, static HTTP latency, cache MISS/HIT latency,
24+
load-balancer route timing, keep-alive throughput, and fresh TLS connection
25+
timing.
2126
- Added `docs/pingora-dependency-exceptions.tsv` and
2227
`scripts/validate-pingora-dependency-policy.sh` so the 1.6 line has a
2328
release-gated inventory of allowed Pingora crates per official profile.

scripts/capture-runtime-baseline.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ if [ "$mode" = "release" ] || [ "${FLUXHEIM_RUNTIME_BASELINE_BUILD:-0}" = "1" ];
108108
bytes="$(wc -c <"$binary" | tr -d ' ')"
109109
printf 'default\t%s\t%s\n' "$binary" "$bytes"
110110
} >"$out_dir/binary-size.tsv"
111+
112+
if [ "${FLUXHEIM_RUNTIME_BASELINE_PERFORMANCE:-1}" = "1" ]; then
113+
scripts/capture-runtime-performance-baseline.sh release
114+
else
115+
echo "runtime baseline: skipping performance baseline because FLUXHEIM_RUNTIME_BASELINE_PERFORMANCE=0"
116+
fi
111117
else
112118
{
113119
printf 'profile\tpath\tbytes\n'

0 commit comments

Comments
 (0)