Skip to content

Commit

Permalink
Update perf-testing-setup.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
YunchuWang authored Jan 6, 2024
1 parent 7757eb1 commit 32f19df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/perf-testing-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
echo "Starting py-spy in background..."
echo "Container id is $container_id"
docker exec $container_id sh -c "pip install py-spy"
docker exec -d $container_id sh -c "py-spy record -p $worker_pid -o /home/site/wwwroot/helloperf.svg -f flamegraph --idle --nonblocking --rate 1500 &"
docker exec -d $container_id sh -c "py-spy record -p $worker_pid -o /home/site/wwwroot/helloperf.svg -f flamegraph --idle --nonblocking --rate 1500 --duration 60 &"
sleep 2 # Give it a moment to start
py_spy_id=$(docker exec $container_id sh -c "ps aux | grep '[p]y-spy record'" | awk '{print $2}')
echo "py_spy_id=$py_spy_id" >> $GITHUB_ENV
Expand All @@ -94,9 +94,10 @@ jobs:
.ci/perf_tests/run-perftests.sh localhost $PORT ${{ env.TESTS_DIR_PATH }} ${{ matrix.test_to_run }}
echo "Tests completed, terminating py-spy..."
echo "Py-Spy pid is $py_spy_id"
docker exec $container_id sh -c "kill -2 $py_spy_id"
# docker exec $container_id sh -c "kill -2 $py_spy_id"
docker exec $container_id sh -c "ls -ltr /home/site/wwwroot"
docker exec $container_id sh -c "ls -ltr"
sleep 2
docker cp $container_id:/home/site/wwwroot/helloperf.svg .
- name: Upload profiling result to artifact
Expand Down

0 comments on commit 32f19df

Please sign in to comment.