Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre_check: :all_same option #443

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

sabiwara
Copy link
Contributor

@sabiwara sabiwara commented Dec 5, 2024

Close #435

I tried to split individual commits to help with the review.

Note regarding b33b5cf

I noticed that Benchee.UnknownProfilerError might have accidentally been declared as Benchee.Profile.Benchee.UnknownProfilerError, hence the proposed move to a new file where we can define custom errors in the top-level Benchee. If nesting was voluntary here, I'm happy to replicate this pattern and define it within Benchee.Benchmark.Runner.

Note regarding the name

I'm OK with the originally proposed :assert_all_same as well, but since it is used within pre_check, the notion of checking/asserting felt slightly redundant and pre_check: :all_same felt enough. Happy to change it back or to something else entirely 🙂

Note regarding 44dff6f

I implemented a custom collector in order to retrieve the return value, but thanks to dialyzer I realized it didn't strictly speaking match the behaviour which expects a number. We could perhaps override scenario.function to a wrapper sending a message to the parent, but I wanted to consult you first about the best approach.

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.

Feature suggestion: assert_all_same option to compare alternative implementations
1 participant