]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - tests/unit/runme_mem
add the xmlrpc testsuite (wiki and interop) from xmlrpc-epi
[SourceForge/phpwiki.git] / tests / unit / runme_mem
1 #!/bin/sh
2 # memory regression suite.
3 # runs some tests, with some define combinations and stores it in .result and .data files.
4 #
5 # TODO: need to check write perms to the .testbox/* (mixed web/cli perms)
6 # TODO: need to add the ploticus path
7
8 #if [ -d .testbox/page_data -a ! -w .testbox/page_data/AllPages ]; then
9 #  rm -rf .testbox/test_*.*db*
10 #fi
11 db=dba
12 level="level=2"
13 tests="test=SetupWiki test=AllPagesTest test=DumpHtml"
14 prefix=$1
15 if [ -z $prefix ]; then prefix="439dba"; fi
16 chmod -R a+rw .testbox .dumphtml
17
18 today=`date`
19 for define in USECACHE ENABLE_USER_NEW; do
20   file1="${prefix}_${define}_true"
21   file2="${prefix}_${define}_false"  
22   php -Cq -d register_argc_argv=1 test.php -d${define}=true level=2 debug=9 db=$db $tests | tee ${file1}.result
23   ./prepare_pl ${file1} -nopl
24   #pl -png -o ${file1}.png ${file1}.ploticus
25
26   php -Cq -d register_argc_argv=1 test.php -d${define}=false level=2 debug=9 db=$db $tests | tee ${file2}.result
27   ./prepare_pl ${file2} -nopl
28   #pl -png -o ${file2}.png ${file2}.ploticus
29 done
30
31 # get the relevant mem numbers (testsetupwiki, test99dumphtml)
32 # combine the results and display the graph
33 ./combine_define.pl $prefix
34
35 #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
36
37 # 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
38
39 #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
40
41 #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