Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Bozarth <[email protected]>
  • Loading branch information
ajbozarth committed Nov 26, 2024
1 parent aac4f07 commit bd63efc
Showing 1 changed file with 10 additions and 21 deletions.
31 changes: 10 additions & 21 deletions .github/workflows/locust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: locust

on:
push:
branches: [ '*' ]
branches: [ 'main' ]
paths: ['.github/workflows/locust.yml', 'locust/**']
pull_request:
branches: [ 'main' ]
Expand Down Expand Up @@ -59,16 +59,14 @@ jobs:
oqs-locust
oqs-locust:0.0.1
# Launch the Locust environment with a single worker for this test case.
- name: Launch Locust in Docker Compose
working-directory: ./locust
run: |
LOGGER_LEVEL=DEBUG HOST=https://localhost:4433 GROUP=kyber768 docker compose up -d --scale worker=1
# Launch the Locust environment with a single worker for this test case.

- name: Wait for master to start
run: sleep 15
# Allow the test to complete by waiting longer than the specified run-time.
- run: sleep 10

# Start the OpenSSL quantum-safe server inside the Locust worker container.
- name: Start OpenSSL server
working-directory: ./locust
run: |
Expand All @@ -78,39 +76,30 @@ jobs:
-www \
-tls1_3 \
-groups kyber768
# Start the OpenSSL quantum-safe server inside the Locust worker container.

- name: Wait for worker to start
run: sleep 20
# Allow the test to complete by waiting longer than the specified run-time.
- run: sleep 10

# Trigger the Locust load test by sending a POST request to the Locust master API.
- name: Run Locust load test
working-directory: ./locust
run: |
curl -X POST -H 'content-type: application/x-www-form-urlencoded' \
--data-raw 'user_count=1&spawn_rate=1&host=https%3A%2F%2Flocalhost%3A4433&run_time=30s' \
http://localhost:8189/swarm
# Trigger the Locust load test by sending a POST request to the Locust master API.
# Allow the test to complete by waiting longer than the specified run-time.
- name: Wait for test to finish
run: sleep 70
# Allow the test to complete by waiting longer than the specified run-time.

# Fetch the Locust test results in CSV format using the /stats/requests API.
- name: Download and Check JSON report
working-directory: ./locust
run: |
curl 'http://localhost:8189/stats/requests/csv' -o results.out &&
cat results.out | grep kyber768
# Fetch the Locust test results in CSV format using the /stats/requests API.
# Save the JSON report as an artifact so it can be downloaded after the workflow completes.
- name: Upload JSON report
uses: actions/upload-artifact@v4
with:
name: locust-report
path: locust/locust_report.out
# Save the JSON report as an artifact so it can be downloaded after the workflow completes.

- name: Tear down Docker Compose
working-directory: ./locust
run: docker compose down
# Stop and remove all Locust-related containers to clean up the environment.
path: locust/results.out

0 comments on commit bd63efc

Please sign in to comment.