Files
frankenphp/testdata/performance/flamegraph.sh
Alliballibaba2 072151dfee feat: Adds automatic thread scaling at runtime and php_ini configuration in Caddyfile (#1266)
Adds option to scale threads at runtime

Adds php_ini configuration in Caddyfile
2025-02-19 20:39:33 +01:00

17 lines
546 B
Bash
Executable File

#!/bin/bash
# install brendangregg's FlameGraph
if [ ! -d "/usr/local/src/flamegraph" ]; then
mkdir /usr/local/src/flamegraph &&
cd /usr/local/src/flamegraph &&
git clone https://github.com/brendangregg/FlameGraph.git
fi
# let the test warm up
sleep 10
# run a 30 second profile on the Caddy admin port
cd /usr/local/src/flamegraph/FlameGraph &&
go tool pprof -raw -output=cpu.txt 'http://localhost:2019/debug/pprof/profile?seconds=30' &&
./stackcollapse-go.pl cpu.txt | ./flamegraph.pl >/go/src/app/testdata/performance/flamegraph.svg