Skip to content

Conversation

@MichaelYochpaz
Copy link

Add performance benchmarking infrastructure for fromager including GitHub Actions workflows for nightly and on-demand runs.

See the newly created README for full information.

Closes #734

@mergify mergify bot added the ci label Jan 6, 2026
uv sync --extra benchmark

# Run all benchmarks
uv run pytest benchmarks/
Copy link
Member

Choose a reason for hiding this comment

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

We've standardized on hatch as the main entry point for everything else in this repo. How would someone run these tests through hatch?

Copy link
Member

Choose a reason for hiding this comment

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

Modifying pyproject.toml to install the benchmark extras in the test env and then running hatch run test:pytest benchmarks/ did it.

It would be nice to have an alias, though, something like hatch run benchmark.

Copy link
Author

@MichaelYochpaz MichaelYochpaz Jan 6, 2026

Choose a reason for hiding this comment

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

You're right, missed that. I'll update it (although I think migrating to uv might be a good idea and should be fairly simple, but that's a separate discussion / task).

It's still a very initial draft I just completed and wanted to push so it's backed up and not just stored locally.
I'll give a more detailed explanation about the design and workflows once it's ready for review.

Copy link
Member

Choose a reason for hiding this comment

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

OK, sounds good.

Running the tests gives me error: unrecognized subcommand 'download' from uv pip download. Maybe I need a newer uv?

$ uv --version
uv 0.9.22 (Homebrew 2026-01-06)

I had been very focused on profiling tools to find hotspots in the code, but I like the idea of having tests like these that we can run as we refine those sections, so thank you for working on this.

Copy link
Author

@MichaelYochpaz MichaelYochpaz Jan 6, 2026

Choose a reason for hiding this comment

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

Looks like an LLM hallucination I need to fix as well (this sub-command doesn't appear to exist) :)
Used AI to write everything for the first phase (with a design researched and reviewed manually), and now I'm at the phase of reviewing everything it wrote and refining / fixing the actual code files (also testing the new GitHub Action pipeline on this PR).

The hope here is to utilize CodSpeed (available free for open-source projects. Used by teams of popular projects like Astral and Pydantic) for easy tracking and visibility of performance metrics over time (or more accurately, over commits / merged branched), while having agnostic benchmarks that don't rely on CodSpeed and are easy to migrate if needed.

You can see an example of the metrics for Pydantic's repo here:
https://codspeed.io/pydantic/pydantic

Add performance benchmarking infrastructure for fromager including GitHub Actions workflows for nightly and on-demand runs.

Signed-off-by: Michael Yochpaz <myochpaz@redhat.com>
@MichaelYochpaz
Copy link
Author

Will recreate the PR from a fork

@mergify
Copy link
Contributor

mergify bot commented Jan 7, 2026

⚠️ The sha of the head commit of this PR conflicts with #902. Mergify cannot evaluate rules on this PR. ⚠️

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add benchmark scripts to easily track and test performence following changes

3 participants