Sha256: 7b38da8c1e249506aafe823328d029a3652d617933f632a62b9a6f48e80b19f9
Contents?: true
Size: 941 Bytes
Versions: 48
Compression:
Stored size: 941 Bytes
Contents
#!/usr/bin/env bash SVG_FILENAME="dev/flamegraph.svg" PROFILE_FILENAME="dev/profile" FLAMEGRAPH_PL="dev/flamegraph.pl" if [[ -z $1 ]]; then echo "Usage: `basename "$0"` TEST_NAME_OR_REGEX" exit 1 fi if ! [[ -s $FLAMEGRAPH_PL ]]; then echo "Downloading flamegraph.pl" curl -Lo $FLAMEGRAPH_PL https://raw.githubusercontent.com/brendangregg/FlameGraph/master/flamegraph.pl fi if [[ -f $SVG_FILENAME ]]; then rm $SVG_FILENAME fi if [[ -f $PROFILE_FILENAME ]]; then rm $PROFILE_FILENAME fi echo "Running test(s) with profiling" PROFILE=1 bundle exec ruby -I test test/integration/kubernetes_deploy_test.rb -n /$1/ > /dev/null echo "Processing profile" cat $PROFILE_FILENAME | perl -w $FLAMEGRAPH_PL --countname=ms --width=1500 --title=$1 > $SVG_FILENAME if [[ -f $SVG_FILENAME ]]; then echo "Done. Opening ${SVG_FILENAME}" open $SVG_FILENAME else echo "Done, but ${SVG_FILENAME} does not exist. Something went wrong." fi
Version data entries
48 entries across 48 versions & 1 rubygems