Skip to content

CommOverTime: Add average message size line views - #156

Merged
ritvikrao merged 2 commits into
mainfrom
comm-avg-msg-size
Jul 28, 2026
Merged

CommOverTime: Add average message size line views#156
ritvikrao merged 2 commits into
mainfrom
comm-avg-msg-size

Conversation

@lvkale

@lvkale lvkale commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Adds average-message-size views to Communication Over Time, plus the line-graph infrastructure they need.

Communication Over Time gets a second radio row — Avg Size Sent / Recv / External Recv / External Node Recv — plotting per-interval bytes-per-message as one unstacked line per entry method (averages are not additive, so stacked bars would be wrong):

  • Y values are log2(bytes) since message sizes span orders of magnitude; ticks are labeled with actual sizes (2, 4, ... 512, 1K, 2K, ... 1M).
  • Only the top 10 EPs by total byte volume are plotted; EPs whose messages all fall in a single interval are omitted as outliers. The status label reports what was omitted.
  • Intervals with no messages break the line rather than plotting zero; rare messages appear as dots.
  • A "Show Legend" checkbox (auto-enabled entering an avg view) opens the movable Legend window listing exactly the plotted EPs with overall average size and message count. Bar views get a top-10-by-total legend.
  • Avg mode forces an unstacked line chart, a white background, and horizontal gridlines, restoring previous settings on leaving. Rate scalings are disabled (bytes/message is already a ratio).

Graph infrastructure (reusable by other tools):

  • NaN values in line data are gaps: lines break instead of dropping to zero, and isolated samples are marked with a dot.
  • Hover popups now work on unstacked line graphs (nearest-series hit test).
  • Optional light horizontal gridlines at every other y tick, drawn under the data.
  • GraphPanel.selectGraphType() for programmatic graph-type switching with control sync; GenericGraphWindow gains getGraphPanel() and a setYAxis(YAxis) overload for custom-labeled axes.

Tested interactively on a 480-PE trace across three review rounds.

🤖 Generated with Claude Code

lvkale and others added 2 commits July 27, 2026 17:32
- NaN values in line data are gaps: the line breaks instead of dropping
  to zero, and samples that start a segment (including isolated points)
  are marked with a dot so sparse series stay visible.
- Hover popups now work on unstacked line graphs: getXValue handles
  LINE, getYValue picks the nearest series within a small pixel
  tolerance, and showPopup admits LINE alongside stacked graphs.
- Optional light horizontal gridlines at every other y tick, drawn
  under the data in a luminance-aware gray (setHorizontalGridlines).
- GraphPanel.selectGraphType() lets tools switch graph type
  programmatically while keeping the bottom controls in sync;
  LINE/BAR/AREA constants are public for callers.
- GenericGraphWindow exposes getGraphPanel() and a setYAxis(YAxis)
  overload for custom-labeled axes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
New "Avg Size" radio row (Sent / Recv / External Recv / External Node
Recv) plotting per-interval bytes-per-message as one unstacked line per
entry method, since averages are not additive:

- Y values are log2(bytes): message sizes span orders of magnitude.
  Ticks are labeled with actual sizes (2, 4, ... 512, 1K, 2K, ... 1M).
- Only the top 10 EPs by total byte volume are plotted; EPs whose
  messages all fall in a single interval are omitted as outliers. The
  bottom label reports what was left out.
- Intervals with no messages break the line (NaN gap) rather than
  plotting zero; rare messages appear as dots.
- A "Show Legend" checkbox (auto-enabled entering an avg view) opens
  the movable Legend window listing exactly the plotted EPs with their
  overall average size and message count; bar views get a top-10
  legend by total.
- Avg mode forces an unstacked line chart, a white background, and
  horizontal gridlines, restoring the previous settings on leaving.
  Rate scalings are disabled (bytes/message is already a ratio).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ritvikrao
ritvikrao merged commit a491ea5 into main Jul 28, 2026
2 checks passed
@ritvikrao
ritvikrao deleted the comm-avg-msg-size branch July 28, 2026 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants