Skip to content

Commit

Permalink
Updating the PProf for 10 min pprof
Browse files Browse the repository at this point in the history
  • Loading branch information
gameofpointers committed Apr 6, 2024
1 parent edbc370 commit 86878b3
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions pprof_tool/pprof.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ names=("all")
# Create the new folder in traces
mkdir -p "traces/$folder"

# Loop over the ports
for i in ${!ports[@]}
do
port=${ports[$i]}
name=${names[$i]}
while true; do
# Loop over the ports
for i in ${!ports[@]}
do
port=${ports[$i]}
name=${names[$i]}

# Run the go tool pprof command for each port
echo "Running pprof for port $port"
curl http://localhost:$port/debug/pprof/goroutine -o "traces/$folder/$name"_"$port"_goroutine.pb.gz
timestamp=$(date +"%Y%m%d-%H%M%S")
# Run the go tool pprof command for each port
echo "Running pprof for port $port"
curl http://localhost:$port/debug/pprof/goroutine -o "traces/$folder/$name"_"$timestamp_"$port"_goroutine.pb.gz
done
done

0 comments on commit 86878b3

Please sign in to comment.