Performance: Quicker/Better Hotpath and A/B Testing#236
Merged
griffinmilsap merged 1 commit intodevfrom Apr 1, 2026
Merged
Conversation
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.
Summary
Add a fast hot-path benchmark suite and an interleaved A/B comparison runner so perf work can happen on short, targeted loops instead of relying only on the long end-to-end
ezmsg-perf runsuite.Motivation
ezmsg-perf runis useful as an end-to-end scenario benchmark, but it is expensive and noisy for everyday regression hunting. This branch adds a second layer of perf tooling aimed at:What Changed
New hot-path benchmark suite
Adds
ezmsg-perf hotpath, a focused same-process roundtrip benchmark that measures:async/localasync/shmasync/tcpwith
sync/*available as an opt-in API surface.Notable characteristics:
us/msg,msg/s, and coefficient of variationNew interleaved A/B runner
Adds
ezmsg-perf ab, which compares two refs by alternating short hot-path runs instead of doing one long monolithic run per side.Key behaviors:
git worktreesCURRENTagainst another ref likedevA/BandB/A) with a reproducible shuffle seedus/msgThis is meant to reduce machine drift bias during long perf sessions.
Same-process transport selection support
Adds publisher-side controls so same-process hot-path benchmarking can characterize
local,shm, andtcpdistinctly instead of always collapsing to the local fast path.Changes include:
allow_local: None | boolforce_tcp: None | boolEZMSG_ALLOW_LOCAL(defaults to enabled)EZMSG_FORCE_TCP(defaults to disabled)Behavior:
allow_local=NoneinheritsEZMSG_ALLOW_LOCALforce_tcp=NoneinheritsEZMSG_FORCE_TCPforce_tcp=Truedisables local delivery and logs an INFO message if local would otherwise have been usedThis keeps the control general-purpose while still allowing stable characterization of same-process SHM and TCP paths.
Tests
Adds focused coverage for:
allow_localandforce_tcpCLI Examples