go-toml/parse2/profile.sh

20 lines
593 B
Bash
Executable File

#!/bin/bash
#cd $GOPATH/src/git.makaay.nl/mauricem/go-toml/cmd/burntsushi-tester/
#go build
#go install
#cd $GOPATH/src/git.makaay.nl/mauricem/go-toml/parse2
#PPFILE=`cat long.toml | $GOPATH/bin/burntsushi-tester 2>&1 | grep "profiling enabled" | cut -d, -f2`
#echo $PPFILE
#ppfile=` | ./parse2 2>&1 | grep "cpu profiling enabled" | cut -d, -f2`
echo "Building ..."
go build
echo "Running ..."
time cat long.toml | ./parse2 2>&1
echo "Profiling ..."
ppfile=`cat long.toml | time ./parse2 2>&1 | grep "cpu profiling enabled" | cut -d, -f2`
go tool pprof -http 0.0.0.0:8888 ./parse2 $ppfile