diff --git a/tests/make_graph b/tests/make_graph index ed9ff1425..f3b15a4ec 100755 --- a/tests/make_graph +++ b/tests/make_graph @@ -38,12 +38,14 @@ done | awk ' print } ' | sort -k7,7 -k1,1n > /tmp/data -while dialog --menu 'Choose function' \ - 25 95 100 \ - $(cat /tmp/data | awk '{ print $7 }' | sort -u | awk '{ print $0, ++n }') \ - 2> /tmp/function +while dialog --separate-output \ + --buildlist 'Choose functions' \ + $lines $columns $lines \ + $(cat /tmp/data | awk '{ print $7 }' | sort -u | awk '{ print $0, $0, "off" }') \ + 2> /tmp/functions do - while dialog --radiolist 'Choose field' \ + while dialog --radiolist \ + 'Choose field' \ 12 20 5 \ 1 flat on \ 2 flat% off \ @@ -66,16 +68,21 @@ do ;; esac - func_name=$(cat /tmp/function) - cat /tmp/data | awk "\$7 == \"$func_name\"" | tee /tmp/datasel | \ - gnuplot -e " + + plots=$( + for func_name in $(cat /tmp/functions) + do + echo \"\< awk \'\$7 == \\\"$func_name\\\"\' /tmp/data\" using 1:$field with lines title \"$func_name\", + done + ) + gnuplot -e " set terminal dumb size $columns $lines enhanced ansi256; set title '$func_name'; set xlabel '# of events'; set y2label '$unit'; - plot '-' using 1:$field with lines title '$func_name'; + plot $plots; pause -1; - " + " read -p "Press Enter to continue" done done diff --git a/tests/start_profiler b/tests/start_profiler index 73476f509..bdcc9041b 100755 --- a/tests/start_profiler +++ b/tests/start_profiler @@ -35,7 +35,7 @@ profiler_cmd() { go tool pprof -proto -sample_index=alloc_space -output results/$(date +%s)-${BALLOON_VERSION}-mem-alloc-space-top.pb.gz http://localhost:6060/debug/pprof/heap go tool pprof -proto -sample_index=inuse_objects -output results/$(date +%s)-${BALLOON_VERSION}-mem-inuse-objects.pb.gz http://localhost:6060/debug/pprof/heap go tool pprof -proto -sample_index=inuse_space -output results/$(date +%s)-${BALLOON_VERSION}-mem-inuse-space-top.pb.gz http://localhost:6060/debug/pprof/heap - go tool pprof -proto -seconds 30 -output results/$(date +%s)-${BALLOON_VERSION}-cpu-profile.pb.gz http://localhost:6060) 2>&1 > /dev/null + go tool pprof -proto -seconds 100 -output results/$(date +%s)-${BALLOON_VERSION}-cpu-profile.pb.gz http://localhost:6060) 2>&1 > /dev/null sleep $PROFILING_RATE_HZ done }