Skip to content

Add a by-benchmark longitudinal plot#429

Merged
mdboom merged 6 commits intofaster-cpython:mainfrom
mdboom:benchmark_longitudinal
May 1, 2025
Merged

Add a by-benchmark longitudinal plot#429
mdboom merged 6 commits intofaster-cpython:mainfrom
mdboom:benchmark_longitudinal

Conversation

@mdboom
Copy link
Copy Markdown
Contributor

@mdboom mdboom commented Apr 29, 2025

This produces by-benchmark longitudinal plots, for example:

Plot by benchmark

benchmarks

@mdboom mdboom requested review from Yhg1s and Copilot April 29, 2025 16:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for generating benchmark longitudinal plots to show performance changes over time per benchmark. Key changes include:

  • Updates to documentation in README files to introduce the new longitudinal plot.
  • Modifications in generate_results.py to include the benchmark longitudinal plot in the plot generation process.
  • Implementation of the new benchmark_longitudinal_plot function and its configuration in plot.py.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
bench_runner/templates/README.md Documentation update to add a link to the new longitudinal plot.
bench_runner/scripts/generate_results.py Updated to include benchmark_longitudinal_plot plot generation.
bench_runner/plot.py Added new function and configuration for benchmark longitudinal plots.
README.md Updated documentation sections to include benchmark longitudinal plot.
Comments suppressed due to low confidence (1)

bench_runner/plot.py:561

  • Ensure that 'r.flags' is consistently sorted prior to comparing with 'cfg["head_flags"]' so that order discrepancies do not lead to unexpected mismatches; consider sorting both values or using set comparison if order is not significant.
if r.version.startswith(cfg["version"]) and r.flags == cfg["head_flags"]:

Comment thread bench_runner/plot.py

base = None
for r in results:
if r.version == cfg["base"] and r.flags == cfg["base_flags"]:
Copy link

Copilot AI Apr 29, 2025

Choose a reason for hiding this comment

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

Consider ensuring that 'r.flags' is consistently sorted before comparison with 'cfg["base_flags"]' to guarantee reliable equality checking; if the order is not guaranteed, using a sorted version or a set comparison might be more robust.

Suggested change
if r.version == cfg["base"] and r.flags == cfg["base_flags"]:
if r.version == cfg["base"] and set(r.flags) == set(cfg["base_flags"]):

Copilot uses AI. Check for mistakes.
Comment thread bench_runner/plot.py Outdated

cfg = get_benchmark_longitudinal_plot_config()

results = [r for r in results if r.fork == "python" and r.nickname == cfg["runner"]]
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.

Maybe this is better suited for a follow-up PR, but how about making 'runners' a list so we can plot different runners in a single graph?

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.

Yeah, that's a good idea.

Comment thread bench_runner/plot.py Outdated
@mdboom mdboom merged commit cb183f8 into faster-cpython:main May 1, 2025
6 checks passed
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.

3 participants