Skip to content

Scrape metrics and draw the standard plots in post-run analysis - #391

Open
radiken wants to merge 2 commits into
masterfrom
alan/post-run-metrics
Open

radiken wants to merge 2 commits into
masterfrom
alan/post-run-metrics

Conversation

@radiken

@radiken radiken commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

The resource and mesh health figures now come out of the run.

Includes #384, which it needs to read a scrape dump; review that one first.

Related to #158

@radiken
radiken changed the base branch from master to alan/plotter-metric-dirs August 11, 2026 02:09
@radiken
radiken changed the base branch from alan/plotter-metric-dirs to master August 11, 2026 02:53
@radiken radiken self-assigned this Aug 11, 2026
@radiken radiken added the ift IFT commitments label Aug 11, 2026
@radiken radiken added this to DST Aug 11, 2026
@radiken radiken moved this to In review in DST Aug 11, 2026
@radiken
radiken removed the request for review from PearsonWhite September 9, 2026 00:29
Post-run analysis covered delivery and latency only, so the resource and mesh-health
half of a regression report was hand-written per campaign: six scrape-and-plot
scripts across the v2.2.0 runs, none of them in the repo.

Bandwidth, memory, connections and mesh degree now come out of the run itself, off
its own stable window.
@radiken
radiken force-pushed the alan/post-run-metrics branch from 479def0 to 989aecf Compare September 18, 2026 11:43
@radiken
radiken marked this pull request as ready for review September 18, 2026 11:43
Comment thread src/analysis/post_run/metrics.py Outdated
Comment on lines +21 to +26
class PlotSpec(NamedTuple):
name: str
metrics: List[str]
ylabel: str
scale: int
fig_size: List[int]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason why we are using this and not src/analysis/plotting/config.py?

Because I have the feeling we are duplicating code here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. It has been a while since I created this but looking at this now I have no idea why I didn't use PlotConfig. Dropped it now in af1dee5

PlotSpec held name, metrics, ylabel, scale and fig_size, which PlotConfig already
has, and plot_run_metrics copied field by field into one. The standard set is now
PlotConfig templates the run copies and fills in with groups and the output path.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@AlbertoSoutullo AlbertoSoutullo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_has_any() uses any(...), but MetricsPlotter processes every metric in template.metrics for every selected group. If a dump contains libp2p-in but not libp2p-out, it is included for the bandwidth plot and then fails when the missing metric produces an empty dataframe.
We shoudl make sure that all metrics exist for the plot, becuase if something is missing, it means that something weird happened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ift IFT commitments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants