2 # memory regression suite.
3 # runs some tests, with some define combinations and stores it in .result and .data files.
5 # TODO: need to check write perms to the .testbox/* (mixed web/cli perms)
6 # TODO: need to add the ploticus path
8 #if [ -d .testbox/page_data -a ! -w .testbox/page_data/AllPages ]; then
9 # rm -rf .testbox/test_*.*db*
13 tests="test=SetupWiki test=AllPagesTest test=DumpHtml"
15 if [ -z $prefix ]; then prefix="439dba"; fi
16 chmod -R a+rw .testbox .dumphtml
17 chmod +x prepare_pl combine_define.pl
20 for define in USECACHE ENABLE_USER_NEW; do
21 file1="${prefix}_${define}_true"
22 file2="${prefix}_${define}_false"
23 php -Cq -d register_argc_argv=1 test.php -d${define}=true level=2 debug=9 db=$db $tests | tee ${file1}.result
24 ./prepare_pl ${file1} -nopl
25 #pl -png -o ${file1}.png ${file1}.ploticus
27 php -Cq -d register_argc_argv=1 test.php -d${define}=false level=2 debug=9 db=$db $tests | tee ${file2}.result
28 ./prepare_pl ${file2} -nopl
29 #pl -png -o ${file2}.png ${file2}.ploticus
32 # get the relevant mem numbers (testsetupwiki, test99dumphtml)
33 # combine the results and display the graph
34 ./combine_define.pl $prefix
36 #pl -png -o all_$db.png -prefab vbars data=$prefix_all_combined.data x=2 y=1 xstep=2 barwidth=line ylbl="memory (kb)" title="$db $title" xlbl="consecutive tests" stubvert=yes ygrid=yes ylbldet="adjust=-0.1,0" xlbldet="adjust=0,-1.2" # vals=yes
38 # pl -png -o stack.png -prefab stack data=$prefix_combined.data x=1 y=2 y2=3 y3=4 y4=5 barwidth=line ylbl="memory (kb)" title="cli-4.3.9WIN" ygrid=yes ylbldet="adjust=-0.1,0" stubvert=yes stackarea=yes name=file name2=dba name3=SQL name4=ADODB
40 #pl -png -o compare.png -prefab compare data=$prefix_combined.data catfields=1 y=3 y2=4 y3=5 y4=6 ylbl="memory (kb)" title="$title" ygrid=yes ylbldet="adjust=-0.1,0" barwidth=0.01 stubvert=yes header=yes name=file name2=dba name3=SQL name4=ADODB
42 #pl -png -o lines.png -prefab lines data=$prefix_combined.data x=2 y=3 y2=4 y3=5 y4=6 ylbl="memory (kb)" title="$title" ygrid=yes ylbldet="adjust=-0.1,0" stubvert=yes header=yes name=file name2=dba name3=SQL name4=ADODB