feat: add per-project native server and SSE command streaming
build / jvm (push) Waiting to run
build / native (macos-15, macos-arm64) (push) Waiting to run
build / native (ubuntu-24.04, linux-x86_64) (push) Waiting to run
build / native (windows-2025, windows-x86_64) (push) Waiting to run
Test / Tests and coverage
Intrepid/AI Engineering/pipeline/head This commit looks good
build / jvm (push) Waiting to run
build / native (macos-15, macos-arm64) (push) Waiting to run
build / native (ubuntu-24.04, linux-x86_64) (push) Waiting to run
build / native (windows-2025, windows-x86_64) (push) Waiting to run
Test / Tests and coverage
Intrepid/AI Engineering/pipeline/head This commit looks good
Keep Spring in a persistent project server with lightweight clients, managed start/stop, bounded SSE subscriptions, cursor recovery and durable mutation outcomes. Preserve SQLite authority and transaction limits, and document reproducible native measurements. Validation: 269 tests, 11 pipeline scenarios, full native/SSE smoke, native package verification and 17 installer tests passed. Implements WRK-000E / DEC-0001 / DEC-0002.
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
# Native local-server measurements
|
||||
|
||||
These historical PLN-0001 measurements cover the initial polling implementation.
|
||||
The delivered SSE implementation is measured separately in [SSE results](local-server-sse-results.md).
|
||||
|
||||
WRK-000E / PLN-0001 measured on 2026-11-22, Apple M2 Pro (10 logical CPUs),
|
||||
16 GiB RAM, macOS 27.2.1 arm64. Native GraalVM CE 25.5.5.0+3, Java 25,
|
||||
Spring Boot 4.0.9 and SQLite JDBC 3.54.1.0. These are observations on this machine.
|
||||
|
||||
| Operation | Samples | Median | p95 | Maximum |
|
||||
|---|---:|---:|---:|---:|
|
||||
| Fresh native client, ready server, `work show` | 100 | 35.22 ms | 41.14 ms | 42.38 ms |
|
||||
| Manual `start` through readiness | 10 | 285.55 ms | 291.38 ms | 291.38 ms |
|
||||
| Automatic first `work show`, server stopped | 10 | 111.27 ms | 113.50 ms | 113.50 ms |
|
||||
| Preserved native baseline, Spring per invocation | 100 | 252.97 ms | 261.32 ms | 304.63 ms |
|
||||
|
||||
Both accepted targets passed: ready-server p95 <=100 ms and readiness <=1 second
|
||||
in every measured start. The ready-server p95 was about 6.4 times faster than the
|
||||
baseline. The baseline is the complete native package preserved before this Work,
|
||||
not a JVM comparison. No Rust implementation or DI migration was benchmarked.
|
||||
|
||||
The initial server implementation failed: ready-server p95 was 652.35 ms.
|
||||
Constructing the entire annotated Picocli command graph repeatedly dominated the
|
||||
cost. The implementation now parses prefixes with Picocli and constructs only
|
||||
the selected branch, with fresh command objects; full catalogs remain available
|
||||
for help and unknown-command diagnostics. EXP-0001 records the refutation and
|
||||
EXP-0002 records the reconsideration and successful repeat.
|
||||
|
||||
The dataset contains 100 synthetic Works and 10 notes per Work in SQLite, created
|
||||
through public commands. No Git repository or provider/network activity is involved.
|
||||
The second experiment copied the stopped original fixture without operational server
|
||||
state. Each timed query checked that its JSON matched the baseline. Ten ready-server
|
||||
warmups preceded 100 independent client processes. Times use Python's monotonic
|
||||
clock, include process launch/transport/queue/operation/output capture, and exclude
|
||||
terminal rendering. p95 uses nearest rank. Process-cold starts do not flush OS caches.
|
||||
Manual `start` includes its management parser; automatic first use takes a shorter
|
||||
path. Server readiness alone does not promise a particular application's operation cost.
|
||||
|
||||
After a fresh start and one `work show` per server, summed resident memory was:
|
||||
|
||||
| Active project servers | Total process RSS |
|
||||
|---|---:|
|
||||
| 1 | 48.52 MiB |
|
||||
| 5 | 242.69 MiB |
|
||||
| 10 | 485.47 MiB |
|
||||
|
||||
The first project contains the nominal dataset; the additional projects contain one
|
||||
Work each. RSS is an idle snapshot after that read, not peak memory or proportional
|
||||
memory; shared pages can be counted repeatedly. Large outputs and provider jobs
|
||||
need separate workload measurements. All fixture servers were stopped afterward.
|
||||
|
||||
Raw samples, initial load average, package component hashes, binary paths and fixture
|
||||
provenance are retained in [the accepted run](benchmarks/local-server-native.json)
|
||||
and [the initial run](benchmarks/local-server-initial.json). The accepted build ID is
|
||||
`79f2d2b1a929f76c59d3214ffe55a635e87ab9f536e3f8c28f88438f2a421747`;
|
||||
native binary SHA-256 is
|
||||
`4764f522935d8fdb1600f5a925e845ddb62689a4743a9e17f8eb433347d1e8c2`.
|
||||
|
||||
To reproduce with new disposable directories and a preserved baseline package:
|
||||
|
||||
```sh
|
||||
python3 scripts/server-benchmark.py \
|
||||
--binary build/native/package/ai-engineering \
|
||||
--baseline /path/to/preserved-package/ai-engineering \
|
||||
--directory /tmp/aie-server-benchmark-new \
|
||||
--output /tmp/aie-server-benchmark-new.json --samples 100 --starts 10
|
||||
```
|
||||
|
||||
Fixture generation is separate from timed operations. `--fixture PATH` can copy a
|
||||
previously generated, stopped synthetic dataset. A failed target returns nonzero;
|
||||
the script still retains its results and stops the disposable servers.
|
||||
|
||||
Verification at the PLN-0001 checkpoint: `./gradlew check` passed 248 tests with no
|
||||
failures or skips and the 11 Jenkins pipeline fixture scenarios. The complete
|
||||
native smoke, native package verifier and 17 disposable installer tests passed.
|
||||
Work/project integrity, shell/Python syntax, documentation links and diff checks
|
||||
passed. Fixture servers were stopped. The measured binary/build hashes still
|
||||
matched that checkpoint's candidate package; the active user installation was not changed.
|
||||
Reference in New Issue
Block a user