-
Notifications
You must be signed in to change notification settings - Fork 87
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
Improve memory footprint of some test #4696
Conversation
Related to #4687. |
f180ed5
to
1a823a8
Compare
00e8458
to
4348027
Compare
The improvement in input-output-hk/typed-protocols#43 is quite significant: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, unfortunate how much of the memory increases just by having a call to counterexample
and the test not failing
ouroboros-network-framework/sim-tests/Test/Ouroboros/Network/Server2/Sim.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/sim-tests/Test/Ouroboros/Network/Server2/Sim.hs
Outdated
Show resolved
Hide resolved
2e05773
to
3ba43a4
Compare
This is unavoidable. It would be cool to have an option to rerun the failed tests with a |
Replaced the implementation of `prop_shrink_nonempty` with `prop_shrinkCarefully`. Use `ShrinkCarefully` in `prop_shrink_valid`.
Improved memory footprint of `prop_shrink_nonequal`. For large test cases retaining whole shrink list leads to a large memory leak (retaining ~2GB of data).
…ment The property is not essential, can be tested in nightly runs only.
Analyse the `Trace` as a stream. This reduces the memory footprint from 35MB to 12MB.
Reduced memory footpring from 21MB to 10MB.
By analysing the data as a single stream reduced the memory footprint from 35MB to 12MB. We won't log the simulation trace on error. This should not be a problem since `io-sim` tests are deterministic, and hence reproducible.
Improved memory footprint (from 21MB to 8MB).
Use `ghc963`.
When a connection is terminating, we can accept a new connection, but we need to be careful to create a new `MutableConnState` for it, otherwise the new connection will be removed from connection manager map leading to a leaked resource, and subsequent assertion failures of the inbound governor (e.g. when it will execute `promotedToWarmRemote`).
Hide `addr`, which makes it more robust to catch the exception.
4e3f226
to
cb3894b
Compare
| NoActiveConnection addr addr | ||
data ExperimentError = | ||
forall addr. (Typeable addr, Show addr) => NodeNotRunningException addr | ||
-- | forall addr. (Typeable addr, Show addr) => NoActiveConnection addr addr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left it, so we can come back to it at some point.
3bf9a76
to
9a8ba69
Compare
Upgraded `haskell.nix` to a newer version.
9a8ba69
to
d60f84a
Compare
Description
Replaced implementation of
prop_shrink_nonempty
withprop_shrinkCarefully
since the latter can shrink.Improved memory footprint of
prop_shrink_nonempty
, e.g. fromto
as measured with on the
shrink nonequal GovernorMockEnvironment
test.Checklist