-
Notifications
You must be signed in to change notification settings - Fork 89
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(tests): initial performance test #2828
Merged
Merged
Changes from 11 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
f903591
feat(tests): initial performance test
njlie 22791bd
feat: add test shell scripts, run inside docker network
njlie dbd8e4d
feat: run script in docker container
njlie 9e3bc2d
chore: formatting
njlie 6c04e11
chore: remove unused script
njlie a44b0bf
fix: update test script parameters
njlie 169026d
fix: ping wallet address hosts instead of wallet addresses
njlie 96c3d73
fix README
njlie 1507336
feat: move wallet address retrieval into setup function
njlie c01d543
feat: add another error condition
njlie 14ea6e5
formatting
njlie 78fa93c
fix: typechecks
njlie 854f854
chore: remove comments
njlie ce5da86
chore: remove empty metadata object
njlie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
packages: | ||
- 'packages/*' | ||
- 'localenv/mock-account-servicing-entity' | ||
- 'test/integration' | ||
- 'test/*' | ||
- 'bruno/collections/Rafiki' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Performance Tests | ||
|
||
This package contains a script that will determine the performance of Rafiki by repeatedly making a series of requests to a Rafiki instance to create several kinds of resources (receivers, quotes, outgoing payments). | ||
|
||
## Prerequisites | ||
|
||
- [Grafana k6](https://grafana.com/docs/k6/latest/set-up/install-k6/) | ||
|
||
- [Grafana k6](https://grafana.com/docs/k6/latest/) is used to run performance test scripts against Rafiki. | ||
|
||
- [Running local playground for Rafiki](../../localenv/README.md) | ||
- It is recommended to start the local playground with Telemetry running in order to see the impact of a performance test. | ||
|
||
If the local environment isn't running it may be started by using the command `pnpm localenv:compose:telemetry:up`. | ||
|
||
## Run tests | ||
|
||
To run the performance tests (of which there is currently only one): | ||
|
||
``` | ||
pnpm --filter performance run-tests | ||
``` | ||
|
||
The test makes a few checks to verify the local playground is running, then runs the k6 binary on the [create-outgoing-payments.js](./scripts/create-outgoing-payments.js) script. | ||
|
||
The test can also be run inside of a Docker container on the same Docker network as the Local Playground: | ||
|
||
``` | ||
pnpm --filter performance run-tests-docker | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "performance", | ||
"version": "1.0.0", | ||
"description": "", | ||
"scripts": { | ||
"test": "k6 run ./scripts/create-outgoing-payments.js", | ||
"test-docker": "docker run --rm --network=rafiki_rafiki -v ./scripts:/scripts -i grafana/k6 run /scripts/create-outgoing-payments.js", | ||
"run-tests": "./scripts/run-tests.sh", | ||
"run-tests-docker": "./scripts/run-tests.sh --docker", | ||
"hostile": "hostile" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"hostile": "^1.4.0" | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this script is useful such that we don't need to set the host names?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took this from the description of the issue:
(Though not setting the host names is a benefit).