Skip to content

Commit

Permalink
Splitting to two functions and adding k6
Browse files Browse the repository at this point in the history
  • Loading branch information
madflojo committed Jun 1, 2024
1 parent 1a82646 commit fc4ea7b
Show file tree
Hide file tree
Showing 11 changed files with 606 additions and 133 deletions.
20 changes: 2 additions & 18 deletions .github/workflows/load.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run the Service
run: make run-background
- name: Wait for the Service to be ready
run: |
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost/ready)" != "200" ]]; do sleep 5; done
- name: Configure Test
run: |
cat << EOF > loadtest-config.yml
url: http://localhost
payloadStr: '{"local_code":"PHX"}'
SLOs:
http/error-rate: 0
http/latency-p99.9: 10
EOF
- uses: iter8-tools/iter8-action@v1
with:
chart: load-test-http
valuesFile: loadtest-config.yml
- name: Run load tests
run: make run-stress
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,21 @@ tests:
docker-compose:
docker compose up -d mysql
sleep 15
docker compose up example
docker compose up data-manager lookup

docker-compose-background:
docker compose up -d mysql
sleep 15
docker compose up -d example

run: build docker-compose
run-nobuild: docker-compose
run-background: build docker-compose-background
run-stress:
docker compose up -d mysql
sleep 15
docker compose up data-manager lookup k6-stress --exit-code-from k6-stress
run-soak:
docker compose up -d mysql
sleep 15
docker compose up data-manager lookup k6-soak --exit-code-from k6-soak

clean:
rm -rf functions/build
Expand Down
Loading

0 comments on commit fc4ea7b

Please sign in to comment.