-
Notifications
You must be signed in to change notification settings - Fork 2
implement performance testing #110
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
Open
Ngha-Boris
wants to merge
23
commits into
main
Choose a base branch
from
performance-test
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
f386919
implement performance testing
Ngha-Boris 51c7c87
implement performance testing
Ngha-Boris 753cd8b
added k6 imports to auth-test
Ngha-Boris eeba6ed
updated the test
Ngha-Boris c1bc0af
updated the test
Ngha-Boris c65b3db
generate key pair for the test
Ngha-Boris 1c2333a
refsctored the token generation script and some test
Ngha-Boris e0dd7d9
switch tool to artillery for better results
Ngha-Boris 29fd6da
created a documentation on how to run the test
Ngha-Boris 3995d1f
created a documentation on how to run the test
Ngha-Boris 2d4f93b
Merge branch '118-global-enhancement-and-optimization' of github.com:…
Ngha-Boris 6a37008
removed the alg field
Ngha-Boris e5d18c8
created sub-directories for the script
Ngha-Boris e5a3dcf
refactor(tests): remove outdated performance test configurations and …
Ngha-Boris fde1604
add authenticated update flow to load, spike, and stress tests
Ngha-Boris 548b971
fix: update token generation command in how-to-run.md and package.json
Ngha-Boris 758c25b
fix: update file paths in token generation script and .gitignore
Ngha-Boris 22f475a
Merge branch 'main' of github.com:adorsys/status-list-server into per…
Ngha-Boris 5108012
fix: correct formatting and typos in how-to-run.md
Ngha-Boris 767a117
feat: add prometheus for memory and cpu usage monitoring
Ngha-Boris f4cac19
fix: remove unused metrics dependency and correct spelling in how-to-…
Ngha-Boris 072eb13
feat: add metrics configuration and Prometheus integration
Ngha-Boris 5034b47
feat: add metrics configuration and Prometheus integration
Ngha-Boris 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,4 @@ | ||
| node_modules | ||
| /scripts/ec-private-key.pem | ||
| /scripts/ec-public-key.jwk | ||
Ngha-Boris marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| /scripts/test-tokens.json | ||
This file contains hidden or 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,54 @@ | ||
| ## How to run the performance test. | ||
|
|
||
| In this tests we have 4 tests which are | ||
| 1. Load test | ||
| 2. Stress test | ||
| 3. Spike test | ||
| 4. Athentication test | ||
|
|
||
| The main aim of each of these tests is to test the performance of the StatusList Server. | ||
|
|
||
| ### Step 1: | ||
|
|
||
| Installed artillery. | ||
| ```bash | ||
| npm install -g artillery | ||
| ``` | ||
| ### Step 3: | ||
|
|
||
| The next step is to generate multiple test tokens that we can use during the performance test | ||
|
|
||
| ```bash | ||
| # go to the test directory | ||
| cd artillery-tests | ||
| npm install | ||
|
|
||
| # run this | ||
| npm run generate-tokens | ||
| ``` | ||
| ### Step 4: | ||
|
|
||
| Create an artillery account at [artillery.io](artillery.io). After creating the account, copy the access key, it should look like this (`artillery run test.yml --record --key YOUR_ACCESS_KEY`) on the welcome screen. | ||
|
|
||
| ### Step 5: | ||
|
|
||
| Run the test. | ||
| ```bash | ||
| artillery run your_test.yml --name "stress-test" --record --key YOUR_ACCESS_KEY | ||
| ``` | ||
|
|
||
| ## Memory and CPU usage | ||
|
|
||
| Go to `localhost:9090` to access the prometheus dashboard. After that, search for the memory or cpu usage | ||
|
|
||
| **Memory usage**: | ||
| ```text | ||
| process_resident_memory_bytes{job="rust_app"} / 1024 / 1024 | ||
| ``` | ||
|
|
||
| **CPU usage**: | ||
| ```text | ||
| rate(process_cpu_seconds_total[30s]) * 100 | ||
| ``` | ||
|
|
||
| Click on graph to see the graph of each. |
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.
Uh oh!
There was an error while loading. Please reload this page.