mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 08:04:45 +00:00
test(geode): keep deletion-settle benchmark as robust shape guard
Drop the flaky publish-into-large-relay warmup from DeletionSettleBenchmark (it timed out the measured reconcile at N=100k — the container noise the docstring already warns against) and remove the throwaway ScratchSettleTiming investigation tool. Record in the docstring what the phase breakdown proved: the settle's extra time over a bare reconcile is O(K) relay-ingest of the K residual deletions, dominated by one-time JVM/JIT warmup of the publish path (consecutive K-note batches fell ~3100->570ms), not the deletion algorithm and not O(N). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JgL1WTV4Hkp2uuXcUHCHGt
This commit is contained in:
@@ -52,6 +52,14 @@ import kotlin.test.assertEquals
|
||||
* (the O(N) part it shares with any sync) next to the settle cost, so the deletion
|
||||
* overhead is visible as "≈ a couple of reconciles + K", not "+ a content re-download".
|
||||
*
|
||||
* Why the printed settle can read as several× a bare reconcile at large N: the extra time
|
||||
* is NOT the deletion algorithm (a phase breakdown showed reconciles stay ~sub-second at
|
||||
* N=100k, and the settle re-fetches K=20, not N). It is entirely the K `publishAndConfirm`
|
||||
* ingests into a large geode relay — publishing K *plain* notes costs the same — and that
|
||||
* ingest path is JVM-cold on first use: consecutive K-note batches dropped monotonically
|
||||
* (~3100 → ~570 ms) purely from JIT warmup. So the cost is O(K) relay-ingest dominated by
|
||||
* one-time warmup, independent of N.
|
||||
*
|
||||
* Default N is small so it doubles as a fast correctness guard; scale it with
|
||||
* `-DdelBenchN=200000` to see the shape at size. Not a speed assertion (container noise).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user