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

Update full_performance_test.yml #17

Merged
merged 7 commits into from
Nov 19, 2024
Merged
Changes from 1 commit
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
44 changes: 22 additions & 22 deletions .github/workflows/full_performance_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Install wget
if: ${{ inputs.tyk_profiler_enabled == true }}
run: sudo apt-get update && sudo apt-get install -y wget

- name: Configure AKS credentials
if: ${{ inputs.cloud == 'Azure' }}
uses: azure/login@v2
Expand Down Expand Up @@ -142,36 +146,14 @@ jobs:
run: |
cd deployments
terraform init

if [[ "${{ inputs.tyk_profiler_enabled }}" == "true" ]]; then
service_type="LoadBalancer"
else
service_type="ClusterIP"
fi

terraform apply \
--var="kubernetes_config_context=performance-testing" \
--var="tyk_version=${{ inputs.tyk_version }}" \
--var="tyk_license=${{ secrets.DASH_LICENSE }}" \
--var="tyk_profiler_enabled=${{ inputs.tyk_profiler_enabled }}" \
--var="tyk_service_type=$service_type" \
--var="grafana_service_type=$service_type" \
--auto-approve
sleep 300

- name: Access to Tyk Gateway Profiler and Grafana Dashboard
if: ${{ inputs.tyk_profiler_enabled == true }}
run: |
echo "###################################################################"
echo "# Grafana Login"
echo "# http://$(kubectl get svc -n dependencies grafana -ojsonpath='{.status.loadBalancer.ingress[0].ip}')"
echo "# Username: admin"
echo "# Password: topsecretpassword"
echo "#"
echo "# Tyk Gateway"
echo "# http://$(kubectl get svc -n tyk gateway-svc-tyk-tyk-gateway -ojsonpath='{.status.loadBalancer.ingress[0].ip}')":8080/debug/pprof/
echo "###################################################################"

- name: Run Tests
run: |
cd tests
Expand All @@ -184,6 +166,24 @@ jobs:
run: |
kubectl logs -n dependencies $(kubectl get pods -n dependencies --selector=app=snapshot-job -o jsonpath='{.items[-1].metadata.name}') --tail=1

- name: Download Profiles
if: ${{ inputs.tyk_profiler_enabled == true }}
run: |
kubectl port-forward svc/gateway-svc-tyk-tyk-gateway -n tyk 8080

wget "http://localhost:8080/debug/pprof/heap?debug=1" --directory-prefix=./profiles/${{ inputs.tyk_version }}-heap.txt
wget "http://localhost:8080/debug/pprof/allocs?debug=1" --directory-prefix=./profiles/${{ inputs.tyk_version }}-allocs.txt
wget "http://localhost:8080/debug/pprof/goroutine?debug=1" --directory-prefix=./profiles/${{ inputs.tyk_version }}-goroutine.txt

- name: Upload Profiles
uses: actions/upload-artifact@v3
zalbiraw marked this conversation as resolved.
Show resolved Hide resolved
with:
name: ${{ inputs.tyk_version }}-profiles
path: |
${{ inputs.tyk_version }}-heap.txt
${{ inputs.tyk_version }}-allocs.txt
${{ inputs.tyk_version }}-goroutine.txt

- name: Destroy Tests
run: |
cd tests
Expand Down