Repository navigation
feat: add metrics to BroadcastExec - #895
Open
raghavyadav01 wants to merge 1 commit into
Open
raghavyadav01 wants to merge 1 commit into
raghavyadav01 wants to merge 1 commit into
Conversation
Record output rows, bytes and batches for each output partition, time spent pushing and reading batches as elapsed_compute, and the peak bytes buffered while waiting for slower consumers as max_mem_used. Signed-off-by: Raghav Yadav <raghavmnnit@gmail.com>
raghavyadav01
force-pushed
the
feat/broadcast-exec-metrics
branch
2 times, most recently
from
November 18, 2026 23:21
cd5f547 to
e1d5526
Compare
This branch has not been deployed
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.
Closes #848.
BroadcastExechad no metrics, so inEXPLAIN ANALYZEand the collected task metrics it showed up asmetrics=[].It now reports:
output_rows,output_bytes,output_batchesfor each output partition. A batch read by 3 consumer tasks is counted 3 times, since that's what the node outputs.elapsed_compute: time spent buffering input batches (not tied to an output partition, since each input partition is buffered once for all consumers) plus time spent by each consumer reading from the queue.max_mem_used: peak bytes buffered across input partitions while waiting for slower consumers. It goes up when a batch is pushed and down when every reader has read it and it's evicted, using the same sizes as the existing memory reservations.Tests:
test_metrics_collection_in_broadcast_joinchecks a broadcast join over the metrics collection path (output rows and bytes are exactly 3x the build side, and the peak is below what the consumers read), andbroadcast_exec_tracks_buffered_memorychecks the buffered bytes go back to 0 once both consumers finish.