-
Notifications
You must be signed in to change notification settings - Fork 25
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
Testdata statistics #31
base: master
Are you sure you want to change the base?
Conversation
On the implementation side, event tracking should be thread safe. Does using test name as an ID work with I'd prefer to use Continuing that thought, Hypothesis does a good job showing summary of data generation even when no custom events were emitted. Do you think having "just" custom events is useful enough, or maybe we should try to start with built-in event/summary thing first, and add custom events on top (like Hypothesis does)? That way, regular users get useful functionality with no additional APIs to use (simply add a new command-line flag and gain insight into the data generation). |
@flyingmutant very good points, thread safety was not on my checkmark. That happens if you are for a long time in the Erlang/Elixir world :-) I really like the idea to call The internal events from Hypothesis can be improved, simply due to not reaching 100% or show even more. This is confusing. But it could be healed by enabling several reports for one test case. Things like I'll try to find some time during the weekend to rework the PR. |
Great, looking forward to then next version! |
@flyingmutant Next round, but there is more to be done. What I did:
What is still missing before done:
Open question (advice required):
Possible extension
|
It uses now a mutex to protect both, writing to the stats and printing the stats. The channels are gone. Since printing is done after finishing the property, there should be most likely no still running go-routines exposing event - but if so, then we will miss them. This is ok.
This PR implements the proposal of #30.
I am using interface
rapid.TB
instead ofrapid.T
to introduce a test adapter for checking thePrintStats()
methods. That reads a little odd, any improvement here are welcome.