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

Performance test suite #261

Merged
merged 9 commits into from
Jun 19, 2024
Merged

Performance test suite #261

merged 9 commits into from
Jun 19, 2024

Conversation

bigspider
Copy link
Collaborator

@bigspider bigspider commented Jun 18, 2024

Adds a test suite to measure the performance of the app on a series of synthetically generated testcases.

The Makefile adds a new AUTOAPPROVE_FOR_PERF_TESTS that compiles a version of the app that automatically approves any request, in order to remove the UX interactions from the measurements. As a sanity precaution, compilation is aborted if this flag is enabled when compiling on mainnet.

The test suite can be ran either on speculos or on a real device; measured times on speculos are of course not a good indicator of the performance on real devices; nevertheless, the test suite is added as a CI job, since comparing the performance reports before and after a change can give a useful indicator about expected or unexpected changes in the running time. The performance report is also saved as a json artifact.

The PR adds an initial set of benchmarks related to signing different kinds of transactions. More extensive benchmarks can be added in the future.

Some legacy tests using the txmaker tool are deleted; no longer worth the maintenance burden.

This option allows to compile the testnet app in a mode that allows
autoapproving any request, in order to measure the performance of
various operations either in speculos, or on a real device.
@bigspider bigspider force-pushed the perftests branch 2 times, most recently from ba8cbd1 to 16475d6 Compare June 18, 2024 13:45
@bigspider bigspider force-pushed the perftests branch 12 times, most recently from dc0d935 to c943cea Compare June 19, 2024 12:21
@bigspider bigspider marked this pull request as ready for review June 19, 2024 12:23
These tests are no longer worth the maintenance burden, as they test specific conditions and
only apply to an old version of the app protocol.
The corresponding tests for the newer version of the protocol are kept in the codebase.
It is useful to test that large amounts are shown correctly; instead of generating the psbt
synthetically, we hardcode a fixed psbt so we can hardcode the screenshots.
@bigspider bigspider marked this pull request as ready for review June 19, 2024 15:11
yogh333
yogh333 previously approved these changes Jun 19, 2024
Copy link

@yogh333 yogh333 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

sonarcloud bot commented Jun 19, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@bigspider bigspider merged commit 4bc144a into develop Jun 19, 2024
147 of 148 checks passed
@bigspider bigspider deleted the perftests branch June 19, 2024 21:10
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