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

Kevin/load test cleanup #1490

Merged
merged 13 commits into from
Apr 30, 2020
Merged

Kevin/load test cleanup #1490

merged 13 commits into from
Apr 30, 2020

Conversation

kevsul
Copy link
Contributor

@kevsul kevsul commented Apr 27, 2020

Overview

Clean up and refactor load test code, making the scenarios more modular and composable.

Changes

Describe your changes and implementation choices. More details make PRs easier to review.

  • Add FundAccount scenario
  • Add SpendEthUtxo scenario
  • Refactor duplicate submit_transaction code
  • Allow a delay before sending transactions
  • Allow gas_price be configurable

@coveralls
Copy link

coveralls commented Apr 27, 2020

Coverage Status

Coverage remained the same at 77.983% when pulling 1ac3b15 on kevin/load-test-cleanup into 97e2aa5 on master.

Copy link
Contributor

@boolafish boolafish left a comment

Choose a reason for hiding this comment

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

Some high level questions and comment:

  1. What problem has you bumped so we start to configure gas_price? (Just curious, not saying it really needs justification)
  2. Same, why for the delay? Seems like you must encountered some instability?
  3. Might consider to add the essential config values in each scenario to their documents.

|> Transaction.sign(keys: keys)
|> try_submit_tx(retries)

outputs
Copy link
Contributor

Choose a reason for hiding this comment

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

n00bie comment, but would it be more consistent for public api to return {:ok, data} instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, good question.

The way I see it is that this function never returns an {:error condition, so returning {ok, is unnecessary. That is, the function will either successfully return the outputs of a tx or it will fail, but it won't return an :error that can be handled.

I'm happy to be taught otherwise though...

@kevsul
Copy link
Contributor Author

kevsul commented Apr 28, 2020

  1. What problem has you bumped so we start to configure gas_price? (Just curious, not saying it really needs justification)

Mainnet and Rinkeby gas prices are higher than Ropsten.

  1. Same, why for the delay? Seems like you must encountered some instability?

No, this is so that you can control how fast the txs are sent. Setting this to 0 means send txs as fast as possible, but for example with a long running test we want to send txs at a slower rate

  1. Might consider to add the essential config values in each scenario to their documents.

Yes, good idea

@kevsul kevsul requested a review from pgebal April 30, 2020 12:02
@kevsul kevsul merged commit 857ebea into master Apr 30, 2020
@kevsul kevsul deleted the kevin/load-test-cleanup branch April 30, 2020 14:46
@unnawut unnawut added the chore Technical work that does not affect service behaviour label Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Technical work that does not affect service behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants