report median and p99 from the pith grpc client - #620
Merged
Conversation
the client printed an "average" computed as wall clock over total calls, which under eight-way concurrency divides one stream's worth of time across all eight — it read almost an order of magnitude better than the go and rust medians while measuring something else entirely. the comment blaming millisecond clock resolution predated the monotonic nanosecond clock. every call is now timed with mono_nanos, each worker pushes its latencies into a shared per-worker list, and the merged sorted set yields the same nearest-rank median and p99 the go client prints, in the same duration format. the doc table is refreshed from a three-round interleaved rerun with all three clients on identical metrics: pith 7476 calls/sec at 954us median against go's 14731 at 471us and rust's 12005 at 591us on the 16-byte payload. workers hand latencies back through a shared list handle rather than a task result, because extracting an awaited result with a list payload miscompiles both ways today — unwrap_or emits an unresolvable call and .ok trips the ir contract's field-offset check. that is filed separately; the comment in the client says why the shape is what it is.
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
the pith grpc benchmark client reported an "average" that was wall clock
divided by total calls — under conc=8 that divides one stream's time across
eight, so it read ~8x better than the go and rust medians while measuring
something different. the stale comment blamed millisecond clock resolution,
which predates the monotonic nanosecond clock.
each call is now timed with
time.mono_nanos, workers push latencies intoper-worker lists, and the merged sorted set produces the same nearest-rank
median and p99 the go client prints, formatted the same way. the performance
doc's grpc table is refreshed from a three-round interleaved rerun on
identical metrics, and it now says plainly that the previous average
flattered pith.
what was tested
built and run against the local tls server: three interleaved rounds, both
payload sizes, all three clients prebuilt. medians of the rounds are what
the doc records.
make docsite-checkpasses; nothing outsidebench/andthe doc changed.
notes
worker latencies come back through a shared list handle rather than a task
return value: extracting an awaited result with a list payload miscompiles
both ways today (
unwrap_oremits an unresolvable bare call;.oktripsthe ir contract's field-offset check at build). filed as its own issue; the
client comments explain the shape.