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

Version Path
kubernetes-deploy-0.30.0 dev/flamegraph-from-tests
kubernetes-deploy-0.29.0 dev/flamegraph-from-tests
kubernetes-deploy-0.28.0 dev/flamegraph-from-tests
kubernetes-deploy-0.27.0 dev/flamegraph-from-tests
kubernetes-deploy-0.26.7 dev/flamegraph-from-tests
kubernetes-deploy-0.26.6 dev/flamegraph-from-tests
kubernetes-deploy-0.26.5 dev/flamegraph-from-tests
kubernetes-deploy-0.26.4 dev/flamegraph-from-tests
kubernetes-deploy-0.26.3 dev/flamegraph-from-tests
kubernetes-deploy-0.26.2 dev/flamegraph-from-tests
kubernetes-deploy-0.26.1 dev/flamegraph-from-tests
kubernetes-deploy-0.26.0 dev/flamegraph-from-tests
kubernetes-deploy-0.25.0 dev/flamegraph-from-tests
kubernetes-deploy-0.24.0 dev/flamegraph-from-tests
kubernetes-deploy-0.23.0 dev/flamegraph-from-tests
kubernetes-deploy-0.22.0 dev/flamegraph-from-tests
kubernetes-deploy-0.21.1 dev/flamegraph-from-tests
kubernetes-deploy-0.21.0 dev/flamegraph-from-tests
kubernetes-deploy-0.20.6 dev/flamegraph-from-tests
kubernetes-deploy-0.20.5 dev/flamegraph-from-tests