Skip to content
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

Add Docker run command for private-isu-benchmarker #440

Merged
merged 5 commits into from
Feb 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,35 @@ jobs:
cd webapp
docker compose up -d

- name: Run the benchmark
- name: Build the benchmark
run: |
cd benchmarker
docker build -t private-isu-benchmarker .

- name: Wait for data initialization to complete
run: |
cd webapp
until docker compose exec -T mysql mysql -uroot -proot -e "SELECT 1 FROM posts LIMIT 1;" isuconp; do
echo "Waiting for database initialization..."
sleep 10
done
until docker compose exec -T mysql mysql -uroot -proot -e "SELECT 1 FROM users LIMIT 1;" isuconp; do
echo "Waiting for database initialization..."
sleep 10
done
until docker compose exec -T mysql mysql -uroot -proot -e "SELECT 1 FROM comments LIMIT 1;" isuconp; do
echo "Waiting for database initialization..."
sleep 10
done
sleep 10

- name: Run the benchmark
continue-on-error: true
run: |
cd benchmarker
docker run --network host --add-host host.docker.internal:host-gateway -i private-isu-benchmarker /opt/go/bin/benchmarker -t http://host.docker.internal -u /opt/go/userdata

- name: Show logs
run: |
cd webapp
docker compose logs