mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 16:14:40 +00:00
Phases 2.1/2.2/2.3, 3.1/3.2, 4, 5.2, and 6 of the launch-optimization plan
land together because they share a single set of seams and a single
benchmark report.
* InProcessWebsocketBuilder + LaunchFixtureRelay wrap quartz's existing
InProcessWebSocket + NostrServer (with EmptyPolicy) so any test can
drive a NostrClient against an in-memory relay seeded with arbitrary
events. Roundtrip verified by LaunchFixtureRelayTest.
* LaunchFixture builds a deterministic 50-note synthetic home-feed
snapshot from a fixed RNG seed (kind:1 + author kind:0 + kind:3 +
kind:10002). A real-world JSONL artifact is a drop-in replacement.
* NoteCard gets a stable testTag + a CompositionLocal-backed
onPlaced hook. Production overhead is one composition-local read
plus one null check per placement (default
LocalNoteCardInstrumentation = null).
* LaunchMarkers records named markers against TimeSource.Monotonic.
LaunchScenario.coldBoot drives the AccountManager (ViewOnly path)
+ DesktopLocalCache + RelayConnectionManager + LocalRelayStore
stack against the fixture relay and reports t_account_logged_in,
t_first_event, t_n_events.
* LaunchBenchmark runs 2 warmup + 5 measured iterations, computes
min/q1/median/q3/max, atomically writes the report file, and is
skipped by default — opt in via AMETHYST_BENCH=true. Baseline +
post-fix snapshots committed under desktopApp/benchmarks/.
* SubscribeBeforeConnectTest proves NostrClient / RelayPool queue REQs
issued before connect() and flush them when the connection comes up.
The bootstrap-config subscription in Main.kt drops its
`connectedRelays.first { isNotEmpty() }` + 30s withTimeoutOrNull gate
on the strength of that invariant — the subscription now fires
eagerly and recovers when no relay ever connects instead of silently
giving up after 30s.
All 274 desktopApp tests pass. No flaky tests introduced.
20 lines
1.1 KiB
Plaintext
20 lines
1.1 KiB
Plaintext
# LaunchBenchmark report — PRE-PHASE-5.2 baseline
|
|
# Captured BEFORE the Main.kt bootstrap-gate removal. The slim benchmark
|
|
# does not drive the App() bootstrap subscription path, so this row is
|
|
# primarily a harness-floor sanity reference for the cold-boot
|
|
# relay→cache pipeline; the gate fix itself is validated by
|
|
# SubscribeBeforeConnectTest rather than by a measurable delta here.
|
|
# date 2026-06-18T07:46:13.631678Z
|
|
# jvm 21.0.9 Homebrew
|
|
# os Mac OS X 26.5 aarch64
|
|
# cpus 10
|
|
# max-heap-mb 512
|
|
# git-sha 48726ee4df (after Phase 1 pyramid + Phase 5.1 icon fix)
|
|
# iterations 5 (after 2 warmup, discarded)
|
|
# fork-mode single-JVM (cold-fork driver deferred)
|
|
|
|
t_account_logged_in n=5 min= 0.27ms q1= 0.27ms median= 0.31ms q3= 0.34ms max= 0.47ms
|
|
t_first_event n=5 min= 0.79ms q1= 0.87ms median= 0.95ms q3= 1.11ms max= 1.15ms
|
|
t_n_events n=5 min= 1.27ms q1= 1.35ms median= 1.36ms q3= 1.48ms max= 2.38ms
|
|
# events-consumed per iteration: [11, 12, 12, 12, 13]
|