fixes for worker process profiling

Signed-off-by: Ava Hahn <a.hahn@f5.com>
This commit is contained in:
Ava Hahn 2025-09-18 00:04:23 +00:00
parent 71990d3988
commit 78baa850a8
7 changed files with 46 additions and 25 deletions

12
run.sh
View file

@ -36,24 +36,25 @@ go build keepalive-svc.go
mv keepalive-svc kasvc/
rsync -avz $1 kaproxy/
sudo docker-compose up --build -d
sudo docker exec -it $KAPROXY callgrind_control -i off
sudo docker exec $KAPROXY callgrind_control -i off
sudo docker wait $KACLIENT
echo "[+] client finished, triggering reload"
sudo docker exec -it $KAPROXY callgrind_control -i on
sudo docker exec $KAPROXY callgrind_control -i on
sudo docker kill -s CONT $KAPROXY
echo "[+] wait five seconds for reload complete"
sleep 5
sudo docker exec -it $KAPROXY callgrind_control -i off
echo " > restarting client"
sudo docker-compose restart kaclient
sudo docker wait $KACLIENT
echo "[+] client finished again. Killing NGINX and fetching profile data"
echo "[+] client finished again. reloading NGINX and fetching profile data"
sudo docker kill -s CONT $KAPROXY
sudo docker exec $KAPROXY callgrind_control -i off
sudo docker kill -s INT $KAPROXY
sudo docker exec -it $KAPROXY callgrind_control -d
sleep 10
echo "[+] building profiling report"
sudo docker exec $KAPROXY bash -c "find /tmp -iname \"callgrind.out*\"" | while read file
@ -64,7 +65,6 @@ do
sudo chmod 777 $F
echo "Output file: $F" >> $PROFILE_OUTPUT
callgrind_annotate \
--include=kaproxy \
--auto=yes \
$F >> $PROFILE_OUTPUT
echo "End of profile: $F\n\n\n" >> $PROFILE_OUTPUT