Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
STM_sequential
usesGen.sized
to generatecmd list
s, which means the output size depends onGen.nat
, which may output lists of up size 10.000 with a 5% chance.Here's are some quick stats to illustrate, here on the Domain.DLS STM test:
A cmd list of length 9737 is excessive - and now hurts client users of the library, such as Ortac's QCheck-STM plugin!
This PR therefore proposes to replace the distribution with an exponential distribution instead.
For a start I've gone with a mean of 10, and added a bit of skew to avoid generating too many empty
cmd lists
, which should be less interesting in a state-machine setup. The resulting distribution looks as follows (now with count raised to 10000, and a 230/10000 ~ 2.3% chance of generating empty cmd lists which seems reasonable):I'm curious to see how this fares on the CI.
Shoutout to @nikolaushuber for reporting this.
Note to self: might warrant a changelog entry.