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

Per-phase statistics reporting #2422

Merged
merged 1 commit into from
May 12, 2020
Merged

Conversation

Zac-HD
Copy link
Member

@Zac-HD Zac-HD commented May 9, 2020

Fixes #1555.

I've also gone for a more substantial refactoring than the bare minimum. Where the old scheme converted attributes directly into report lines, this PR prefers to ship around a blob of JSON and provide a function for converting it to report lines.

Having a machine-readable form that we can dump out makes analysis (c.f. #437 (comment)) much easier, whether that's to assess a test suite, compare fuzzers, or decide if a proposed change is robustly better than the status quo. There's no public or supported interface in this PR, but it makes experimentation much easier - for example, I'm planning to use this to assess the effectiveness of targeted PBT and/or swarm testing vs. a baseline 🙂

To install this branch and try it out, pip install -U git+https://github.com/Zac-HD/hypothesis.git@better-stats#subdirectory=hypothesis-python

@Zac-HD Zac-HD added enhancement it's not broken, but we want it to be better legibility make errors helpful and Hypothesis grokable labels May 9, 2020
@Zac-HD Zac-HD requested a review from DRMacIver May 9, 2020 14:43
@Zac-HD Zac-HD force-pushed the better-stats branch 10 times, most recently from c902b39 to 3953d8f Compare May 11, 2020 06:23
The per-phase reporting is the big part, but the new system is also designed for easier dumping of machine-readable data (as json).

This is useful for research evaluations, and for general performance monitoring too.
@Zac-HD
Copy link
Member Author

Zac-HD commented May 12, 2020

Thanks for the review David 😄

@DRMacIver
Copy link
Member

Thanks for the review David 😄

Not my most detailed review I'll grant, but it seemed sensible, didn't touch any public API, and passed the tests so I decided a cursory review was better than holding it back for longer. 😅

@Zac-HD Zac-HD merged commit e4f3617 into HypothesisWorks:master May 12, 2020
@Zac-HD Zac-HD deleted the better-stats branch May 12, 2020 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement it's not broken, but we want it to be better legibility make errors helpful and Hypothesis grokable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Report separate statistics for test cases in reuse, generate, and shrink phases
2 participants