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

Load test runner implementation #194

Merged
merged 35 commits into from
Apr 15, 2024

Conversation

goran-ethernal
Copy link
Collaborator

@goran-ethernal goran-ethernal commented Apr 10, 2024

Description

GO implementation of a load test runner.

Load test tool can be run on the blade binary, since it is added as a command in blade:

Runs a load test on a specified network

Usage:
   load-test [flags]

Flags:
      --dynamic                     indicates whether the load test should generate dynamic transactions
  -h, --help                        help for load-test
      --jsonrpc string              the JSON-RPC interface (default "http://0.0.0.0:8545")
      --mnemonic string             the mnemonic used to generate and fund virtual users
      --name string                 the name of the load test (default "load test")
      --receipts-timeout duration   the timeout for waiting for transaction receipts (default 30s)
      --to-json                     saves results to JSON file
      --txpool-timeout duration     the timeout for waiting for the transaction pool to empty (default 10m0s)
      --txs-per-user int            the number of transactions per virtual user (default 1)
      --type string                 the type of load test to run (supported types: eoa, erc20, erc721) (default "eoa")
      --vus int                     the number of virtual users (default 1)
      --wait-txpool                 waits for tx pool to empty before collecting results

Global Flags:
      --json   get all outputs in json format (default false)

How to run:

  1. Run the cluster of n validators.

  2. Build the binary:

make build
  1. Run load-test command on blade binary:
./blade load-test --mnemonic "code code code code code code code code code code code quality" --jsonrpc "http://localhost:50002" --name "My Test" --type ERC20 --vus 10 --txs-per-user 1000

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

@goran-ethernal goran-ethernal added the feature New feature label Apr 10, 2024
@goran-ethernal goran-ethernal self-assigned this Apr 10, 2024
@goran-ethernal goran-ethernal force-pushed the Load-test-runner-go-implementation branch from 183b66e to 92b01a3 Compare April 10, 2024 16:33
@goran-ethernal goran-ethernal requested a review from a team April 11, 2024 12:02
@goran-ethernal goran-ethernal marked this pull request as ready for review April 11, 2024 12:02
@goran-ethernal goran-ethernal marked this pull request as draft April 11, 2024 12:02
@goran-ethernal goran-ethernal marked this pull request as ready for review April 11, 2024 13:10
@goran-ethernal goran-ethernal force-pushed the Load-test-runner-go-implementation branch from 197d9da to 78722ab Compare April 11, 2024 13:23
@goran-ethernal goran-ethernal marked this pull request as draft April 12, 2024 07:04
@goran-ethernal goran-ethernal force-pushed the Load-test-runner-go-implementation branch from 8dd1bfb to c360cf9 Compare April 12, 2024 10:25
@goran-ethernal goran-ethernal marked this pull request as ready for review April 15, 2024 07:40
txpool/txpool_test.go Outdated Show resolved Hide resolved
txpool/txpool.go Outdated Show resolved Hide resolved
txpool/txpool.go Outdated Show resolved Hide resolved
jsonrpc/client.go Outdated Show resolved Hide resolved
consensus/polybft/fsm.go Outdated Show resolved Hide resolved
consensus/polybft/stale_sequence_check.go Show resolved Hide resolved
loadtest/runner/load_test_runner_test.go Show resolved Hide resolved
loadtest/runner/base_load_test_runner.go Outdated Show resolved Hide resolved
@goran-ethernal goran-ethernal merged commit 162382e into develop Apr 15, 2024
9 of 10 checks passed
@goran-ethernal goran-ethernal deleted the Load-test-runner-go-implementation branch April 15, 2024 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants