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

feat: add load testing with async and parameterized features #12

Merged
merged 13 commits into from
Aug 14, 2024

Conversation

fborello-lambda
Copy link
Contributor

@fborello-lambda fborello-lambda commented Aug 12, 2024

Purpose

  • Add a way to generate multiple transactions with randomWallets to replicate a real world scenario.
  • The gas calculations could be moved to another PR, so that it can be reviewed without to much effort.

How

The proposed implementation is integrated with the typescript cli, to test the command:

bun run cli.ts load-test -w 1

This will generate one random wallet and it can be used with the dev environment(reth and localhost). To have more information on how to use it:

bun run cli.ts load-test --help

output:

Usage:
  $ cli.ts load-test

Options:
  --l1url <l1url>    ETH chain URL, defaults to localhost dev env 
  --l2url <l1url>    zkStack chain URL, defaults to localhost dev env 
  --pk <pk>          Rich PK, defaults to RETH's rich wallet 
  -a, --amount <a>   ERC20 Amount to send, defaults to 100 
  -w, --wallets <w>  Amount of wallets, defaults to 5 
  -h, --help         Display this message 

Examples:
[dev-env]  load-test
[real-env] load-test --l1url <l1-url> --l2url <zkstack_url> --pk <pk> --amount <amount> --wallets <number-of-wallets>

@fborello-lambda fborello-lambda linked an issue Aug 12, 2024 that may be closed by this pull request
@fborello-lambda fborello-lambda self-assigned this Aug 13, 2024
@fborello-lambda fborello-lambda changed the title feat: gas and load testing feat: add load testing with async and parameterized features Aug 13, 2024
@fborello-lambda fborello-lambda marked this pull request as ready for review August 13, 2024 18:26
ilitteri
ilitteri previously approved these changes Aug 14, 2024
Copy link
Member

@ilitteri ilitteri left a comment

Choose a reason for hiding this comment

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

LGTM

ManuelBilbao
ManuelBilbao previously approved these changes Aug 14, 2024
Copy link
Contributor

@ManuelBilbao ManuelBilbao left a comment

Choose a reason for hiding this comment

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

LGTM

@ManuelBilbao ManuelBilbao dismissed stale reviews from ilitteri and themself via c2979fd August 14, 2024 19:04
@ilitteri ilitteri merged commit 3c49fd8 into main Aug 14, 2024
@ilitteri ilitteri deleted the fd-gas-and-load-testing branch August 14, 2024 19:06
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.

test: load test the system
3 participants