File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 83
83
echo "Starting py-spy in background..."
84
84
echo "Container id is $container_id"
85
85
docker exec $container_id sh -c "pip install py-spy"
86
- 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 &"
87
- 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"
86
+ # 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 &"
87
+ 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 &"
88
+ # 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"
88
89
sleep 2 # Give it a moment to start
89
90
py_spy_id=$(docker exec $container_id sh -c "ps aux | grep '[p]y-spy record'" | awk '{print $2}')
90
91
echo "py_spy_id=$py_spy_id" >> $GITHUB_ENV
94
95
chmod 755 .ci/perf_tests/run-perftests.sh
95
96
.ci/perf_tests/run-perftests.sh localhost $PORT ${{ env.TESTS_DIR_PATH }} ${{ matrix.test_to_run }}
96
97
echo "Tests completed, terminating py-spy..."
98
+ docker exec $container_id cat /home/site/wwwroot/py-spy.log
97
99
echo "Py-Spy pid is $py_spy_id"
98
100
# docker exec $container_id sh -c "kill -2 $py_spy_id"
99
101
py_spy_id=$(docker exec $container_id sh -c "ps aux | grep '[p]y-spy record'" | awk '{print $2}')
You can’t perform that action at this time.
0 commit comments