mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 16:33:27 +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.
22 lines
1.2 KiB
Plaintext
22 lines
1.2 KiB
Plaintext
# LaunchBenchmark report — POST-PHASE-5.2 (gate removal) snapshot
|
|
# Captured AFTER the Main.kt bootstrap-gate removal. NOTE: the slim
|
|
# benchmark does not actually exercise the gated code path (the gate is
|
|
# inside the App() composable, which this harness does not drive). The
|
|
# row remains a harness-floor sanity check; the gate-removal payoff
|
|
# manifests during real App() boot when no relay has connected yet and
|
|
# the previous 30s `withTimeoutOrNull` would otherwise idle the
|
|
# subscription.
|
|
# date 2026-06-18T07:57:51.519608Z
|
|
# jvm 21.0.9 Homebrew
|
|
# os Mac OS X 26.5 aarch64
|
|
# cpus 10
|
|
# max-heap-mb 512
|
|
# git-sha 48726ee4df23bf97c6e302766af42e048c3060f0
|
|
# iterations 5 (after 2 warmup, discarded)
|
|
# fork-mode single-JVM (cold-fork driver deferred)
|
|
|
|
t_account_logged_in n=5 min= 0.21ms q1= 0.48ms median= 0.72ms q3= 0.87ms max= 1.15ms
|
|
t_first_event n=5 min= 1.17ms q1= 1.34ms median= 1.46ms q3= 2.06ms max= 2.10ms
|
|
t_n_events n=5 min= 1.51ms q1= 1.76ms median= 2.63ms q3= 2.75ms max= 3.55ms
|
|
# events-consumed per iteration: [23, 50, 15, 28, 23]
|