Skip to content

Commit

Permalink
Set up seperate load tests, one that only reads, and one that reads w…
Browse files Browse the repository at this point in the history
…hile data is being written.
  • Loading branch information
lukas-phaf committed Jan 17, 2024
1 parent aa87c26 commit 9a54f19
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,29 +58,43 @@ jobs:
- name: Test client runs without errors
run: DYNAMICTIME=false LOTIME=1000-01-01T00:00:00Z HITIME=9999-12-31T23:59:59Z docker compose run --rm client

- name: Run load test
- name: Run load test (read only)
run: |
python --version
pip install -r datastore/load-test/requirements.txt
python -m grpc_tools.protoc --proto_path=./protobuf datastore.proto --python_out=datastore/load-test --grpc_python_out=datastore/load-test
cd datastore/load-test
locust -f locustfile_write.py,locustfile_read.py --headless -u 5 -r 1 --run-time 300 --only-summary --csv store
locust -f locustfile_read.py --headless -u 5 -r 10 --run-time 60 --only-summary --csv store_read
- name: Run load test (write + read)
run: |
pip install -r datastore/load-test/requirements.txt
python -m grpc_tools.protoc --proto_path=./protobuf datastore.proto --python_out=datastore/load-test --grpc_python_out=datastore/load-test
cd datastore/load-test
python schedule_write.py > schedule_write.log 2>&1 &
locust -f locustfile_read.py --headless -u 5 -r 10 --run-time 60 --only-summary --csv store_rw
kill %1
cat schedule_write.log
- name: Archive load test artifacts
uses: actions/upload-artifact@v3
with:
name: performance
path: datastore/load-test/store_*.csv
path: |
datastore/load-test/store_read_*.csv
datastore/load-test/store_rw_*.csv
- name: Print results
run: |
pip install csvkit
echo "## Stats" >> $GITHUB_STEP_SUMMARY
csvlook datastore/load-test/store_stats.csv >> $GITHUB_STEP_SUMMARY
echo "## Stats history" >> $GITHUB_STEP_SUMMARY
csvlook datastore/load-test/store_stats_history.csv >> $GITHUB_STEP_SUMMARY
echo "## Failures" >> $GITHUB_STEP_SUMMARY
csvlook datastore/load-test/store_failures.csv >> $GITHUB_STEP_SUMMARY
echo "## Stats (READ ONLY)" >> $GITHUB_STEP_SUMMARY
csvlook datastore/load-test/store_read_stats.csv >> $GITHUB_STEP_SUMMARY
echo "## Failures (READ ONLY)" >> $GITHUB_STEP_SUMMARY
csvlook datastore/load-test/store_read_failures.csv >> $GITHUB_STEP_SUMMARY
echo "## Stats (WRITE + READ)" >> $GITHUB_STEP_SUMMARY
csvlook datastore/load-test/store_rw_stats.csv >> $GITHUB_STEP_SUMMARY
echo "## Failures (WRITE + READ)" >> $GITHUB_STEP_SUMMARY
csvlook datastore/load-test/store_rw_failures.csv >> $GITHUB_STEP_SUMMARY
- name: Cleanup
if: always()
Expand Down

0 comments on commit 9a54f19

Please sign in to comment.