2 # Memory regression helper.
3 # Create a .data file from a .result file, which can then be processed by combine_define.pl
4 # If the 2nd arg is not -nopl some ploticus file is also created.
7 if [ ! -e $result.result ]; then
8 if [ -e $result ]; then result="`echo $result|sed s,.result,,`"
10 echo "$result.result missing"
16 BEGIN { $i=1; print "//inc\tmem\tmsg\n"; }
18 if (/^-- MEMORY USAGE: (\d+)/) {
19 print "$i\t$1\t$msg\n"; $i++;
20 } elsif (/^(\w+)=(\S+)$/) {
25 END { print "\n// PARAMS:\n",$vars; }
26 ' $result.result > $result.data
29 echo "// CREATED=$today" >> $result.data
31 # pl -png -o vbars.png -prefab vbars data=all_dba.data x=2 y=1 barwidth=line vals=yes ylbl="memory (kb)" title="dba cli-4.3.9WIN" xlbl="consecutive tests" stubvert=yes ygrid=yes ylbldet="adjust=-0.1,0" xlbldet="adjust=0,-1.2"
33 # pl -png -o stack.png -prefab stack data=all_dba.data x=2 y=1 barwidth=line ylbl="memory (kb)" title="dba cli-4.3.9WIN" ygrid=yes ylbldet="adjust=-0.1,0" stubvert=yes stackarea=yes name=file name2=file name3=SQL name4=ADODB
35 # pl -png -o all_$db.png -prefab vbars data=all_$db.data x=2 y=1 barwidth=line yfield=1 fill=redorange pointsym=none pointsym2=none
37 if [ "x$2" = "x-nopl" ]; then exit; fi
40 grep $1 $2|cut -d= -f2
42 PHP_SAPI=`php_const PHP_SAPI $result.result`
43 PHP_SAPI=${PHP_SAPI:-cli}
44 PHP_OS=`php_const PHP_OS $result.result`
45 PHP_VERSION=`php_const PHP_VERSION $result.result`
46 PHPWIKI_VERSION=`php_const PHPWIKI_VERSION $result.result`
47 title="$PHP_SAPI-$PHP_OS-$PHP_VERSION $PHPWIKI_VERSION"
48 legendvars=`grep "// " $result.data|cut -c4-`
50 # echo "Usage: pl -png -o $result.png $result.ploticus"
51 # basic memory usage graph for single test
52 cat > $result.ploticus <<EOF
53 // Usage: pl -png -o $result.png $result.ploticus
56 #if \@DEVICE in gif,png
65 #set resultdata = $result.data
66 #include _mem_pl.ploticus
70 textdetails: size=7, align=L