Marten.ScaleTesting: daemonload — running-daemon connection-footprint scenario (jasperfx#486 WS2)#4875
Merged
Merged
Conversation
…asurement (#486) Everything else in Marten.ScaleTesting measures rebuilds; WS2's concern is the steady-state RUNNING daemon at ~100 tenants. daemonload builds an isolated UseTenantPartitionedEvents store with N async projections, registers --tenants tenants, starts the daemon (per-tenant agent fan-out via StartAllAsync), appends continuously across every tenant, and samples pg_stat_activity throughout — attributing connections precisely via a dedicated Application Name on the store's connection string. Reports peak/mean total+busy connections, sustained append rate, and per-tenant catch-up coverage (each tenant's min projection progression vs its own per-tenant sequence ceiling, requiring the full per-projection row count so a never-started agent reads as stalled, not vacuously caught up). --max-connections turns the report into a pass/fail regression gate; --metrics/--trace emit JSON + per-sample CSV. Smoke-verified: 10 tenants x 2 projections = 20 agents, all caught up, ~23 steady connections — already O(agents), which is exactly the WS2 problem this scenario exists to quantify before and after daemon command batching. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the #486 epic — the WS2 (connection conservation at ~100 tenants) measurement primitive. Dev-tool only: no product code, not packaged, not in CI.
What
Everything else in
Marten.ScaleTestingmeasures rebuilds;daemonloadmeasures the steady-state running daemon. It builds an isolatedUseTenantPartitionedEventsstore (own schema, dedicatedApplication Name), registers--tenantstenants, starts the daemon (per-tenant agent fan-out viaStartAllAsync), appends continuously across every tenant, and samplespg_stat_activitythroughout. Reports peak/mean total+busy connections and per-tenant catch-up coverage (min per-tenant projection progression vs that tenant's own sequence ceiling, requiring the full per-projection row count so a never-started agent reads as stalled).--max-connectionsturns the report into a pass/fail regression gate;--metrics/--traceemit JSON + CSV.First numbers (dev box, 100 tenants × 2 projections = 200 agents, 120s @ ~190 events/s)
Two findings:
EventLoader.LoadAsync's session-per-call shape plus pool shaping, and this scenario is the before/after gate for it.🤖 Generated with Claude Code