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

Move ApplyTx benchmarks to using a fixed seed. #2568

Merged
merged 2 commits into from
Dec 6, 2021
Merged

Conversation

nc6
Copy link
Contributor

@nc6 nc6 commented Dec 2, 2021

This should prevent problems where serialisation changes result in
broken benchmarks. Additionally, we now test Allegra and Mary era
transactions.

Unfortunately this means a discontinuity with existing benchmark runs,
but should prevent future discontinuities.

@nc6 nc6 requested a review from lehins December 2, 2021 13:39
@nc6 nc6 force-pushed the nc/bench-rewrite branch 2 times, most recently from e46210e to 1f2748e Compare December 2, 2021 14:06
This should prevent problems where serialisation changes result in
broken benchmarks. Additionally, we now test Allegra and Mary era
transactions.

Unfortunately this means a discontinuity with existing benchmark runs,
but should prevent future discontinuities.
@nc6 nc6 force-pushed the nc/bench-rewrite branch from 1f2748e to b5482da Compare December 2, 2021 14:06
Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have one comment about benchmarks, which hasn't been touched by this PR, but it is important:

applyTxsTransition returns a tuple, which means it is not enough to evaluate it to whnf, it has to be nf in this benchmark:

https://github.com/input-output-hk/cardano-ledger/blob/4e2d082d3a01d8a172d0659b9c6d7f56689570ca/libs/cardano-ledger-test/bench/Bench/Cardano/Ledger/ApplyTx.hs#L120-L127

If NFData instance is a problem at least replacing id with

\(x, y) -> x `seq` y `seq` (x, y)

would be a good idea.

@nc6 nc6 merged commit e7b7773 into master Dec 6, 2021
@iohk-bors iohk-bors bot deleted the nc/bench-rewrite branch December 6, 2021 11:41
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

Successfully merging this pull request may close these issues.

2 participants