Skip to content

Conversation

@bwplotka
Copy link
Member

@bwplotka bwplotka commented Feb 9, 2026

This PR adds ability to compare Prometheus PR against anything in Prometheus repo or quay.io/prometheus/prometheus

It does change the default semantics when doing the typical /prombench main. In the past it was taking the image with the main tag (while PR Prometheus always rebuild from source, from the latest git commit on the GitHub PR), now it builds from source for the given string that can be git SHA, branch name or even PR number. Extra flag bench.use-registry=true has to be added to force using docker image (previous behavior).

Motivation

  • Reduce unknowns:
    • It's not uncommon to do /prombench main and realize you didn't rebase recently and a few commits are in the REF vs current PR. Even with recent rebase you will likely have a different commits as there's a lag between main docker tag and the latest main commit. We could autodetect the shared commit vs main or even merge with main and then benchmark in the next iteration.
    • There's slight difference in Go version I noticed when building from scratch (PR) vs taking from the image.
image
  • Enables benchmarking on feature branches (e.g. measuring difference in perf between feature branch and a PR)
  • Enable comparing across two PRs

Next Steps

  • Once approved if we want this, I have to deploy and test this.

Signed-off-by: bwplotka <bwplotka@gmail.com>
@krajorama
Copy link
Member

The release doc will have to be updated to reflect the change https://github.com/prometheus/prometheus/blob/main/RELEASE.md

Copy link
Member

@krajorama krajorama left a comment

Choose a reason for hiding this comment

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

Looks reasonable.

Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
@bwplotka
Copy link
Member Author

TODO deploy and test before merging

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