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 7, 2024
1 parent 38ee2b7 commit fdbf460
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/perf-testing-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
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 --duration 5 &"
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 5 > /home/site/wwwroot/py-spy.log 2>&1 &"
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 > /home/site/wwwroot/py-spy.log 2>&1 &"
# docker exec $container_id sh -c "py-spy record -p $worker_pid -o /home/site/wwwroot/helloperf.svg -f flamegraph --idle --nonblocking --rate 1500 --duration 5"
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}')
Expand All @@ -97,7 +97,7 @@ jobs:
echo "Tests completed, terminating py-spy..."
docker exec $container_id cat /home/site/wwwroot/py-spy.log
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"
py_spy_id=$(docker exec $container_id sh -c "ps aux | grep '[p]y-spy record'" | awk '{print $2}')
echo "Py-Spy pid is $py_spy_id"
docker exec $container_id sh -c "ls -ltr /home/site/wwwroot"
Expand Down

0 comments on commit fdbf460

Please sign in to comment.