-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #291 from COS301-SE-2024/profile/backend/profiling
Profile/backend/profiling
- Loading branch information
Showing
32 changed files
with
868 additions
and
170 deletions.
There are no files selected for viewing
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
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,90 @@ | ||
name: Load Test System 🏋️💪 | ||
|
||
# trigger action to run once a month on Sunday at 12:00 AM | ||
on: | ||
schedule: | ||
- cron: "0 0 1-7 * 0" | ||
|
||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
working-directory: testing/load | ||
|
||
env: | ||
USERNAME: ${{ secrets.K6_USERNAME }} | ||
PASSWORD: ${{ secrets.K6_PASSWORD }} | ||
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
|
||
jobs: | ||
load_test_backend: | ||
name: 🏋️💪 Load Test Backend 🔌 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: ⬇️ Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🏗 Install k6 | ||
run: | | ||
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69 | ||
echo "deb https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sources.list.d/k6.list | ||
sudo apt-get update | ||
sudo apt-get install k6 | ||
- name: 👩💻 Login to k6 | ||
run: k6 login cloud --token ${{ secrets.K6_CLOUD_TOKEN }} | ||
|
||
- name: 🏋️💪 Run load test | ||
run: k6 run --out=cloud backend.js | ||
|
||
- name: ✅ Load test completed | ||
run: echo "Load test completed successfully!" | ||
|
||
load_test_web: | ||
name: 🏋️💪 Load Test Web 🌐 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: ⬇️ Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🏗 Install k6 | ||
run: | | ||
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69 | ||
echo "deb https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sources.list.d/k6.list | ||
sudo apt-get update | ||
sudo apt-get install k6 | ||
- name: 👩💻 Login to k6 | ||
run: k6 login cloud --token ${{ secrets.K6_CLOUD_TOKEN }} | ||
|
||
- name: 🏋️💪 Run load test | ||
run: k6 run --out=cloud web.js | ||
|
||
- name: ✅ Load test completed | ||
run: echo "Load test completed successfully!" | ||
|
||
load_test_landing_page: | ||
name: 🏋️💪 Load Test Landing Page 🏠 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: ⬇️ Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🏗 Install k6 | ||
run: | | ||
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69 | ||
echo "deb https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sources.list.d/k6.list | ||
sudo apt-get update | ||
sudo apt-get install k6 | ||
- name: 👩💻 Login to k6 | ||
run: k6 login cloud --token ${{ secrets.K6_CLOUD_TOKEN }} | ||
|
||
- name: 🏋️💪 Run load test | ||
run: k6 run --out=cloud landing-page.js | ||
|
||
- name: ✅ Load test completed | ||
run: echo "Load test completed successfully!" |
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
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
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
Binary file not shown.
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.