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

Benchmarking #68

Closed
astutecat opened this issue Sep 27, 2018 · 3 comments
Closed

Benchmarking #68

astutecat opened this issue Sep 27, 2018 · 3 comments

Comments

@astutecat
Copy link

I was speaking to the developer of benchee (https://github.com/PragTob/benchee) about combining benchee and propcheck, wondering if it was possible to somehow hook benchee into a property-based test case so I can get tasty tasty statistics.

Given how property-based testing works it would generate some nice information about whether or not the performance of the thing under test scale in a linear fashion or not without having to write and maintain two sets of generators.

Any ideas?

@astutecat astutecat changed the title Benchmarking? Benchmarking Sep 27, 2018
@evnu
Copy link
Collaborator

evnu commented Sep 27, 2018

Interesting idea! An implementation has to ensure reproducibility, though, which can be complicated (see proper-testing/proper#165, where setting the seed is discussed). Additionally, the problem size must be considered. I guess that proper use of sized/2 could be used for this.

@astutecat
Copy link
Author

Good point - I didn't consider the reproducibility of the benchmarks, which as you say makes this definitely more non-trivial.

@alfert
Copy link
Owner

alfert commented Oct 28, 2019

Benchmarking via properties is a mis-use of PropEr (and other PBT tools) due to its random nature. In principal, you can use deterministic (via a common seed) data generators for load creation, but I would suggest to use DataStream instead of PropCheck since it is more tailored to be used outside of a property based testing approach.

@alfert alfert closed this as completed Oct 28, 2019
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

No branches or pull requests

3 participants