Add benchmark

This commit is contained in:
Ivan Shalganov
2013-01-25 19:13:33 +04:00
parent 164ab85594
commit 4f42efbb9a
16 changed files with 5274 additions and 180 deletions

26
benchmark/run.php Normal file
View File

@ -0,0 +1,26 @@
<?php
echo "Smarty3 vs Twig vs Aspect\n\n";
echo "Generate templates... ";
passthru("php ".__DIR__."/templates/inheritance/smarty.gen.php");
passthru("php ".__DIR__."/templates/inheritance/twig.gen.php");
echo "Done\n";
echo "Testing large output...\n";
passthru("php ".__DIR__."/templates/echo.php");
echo "\nTesting 'foreach' of big array...\n";
passthru("php ".__DIR__."/templates/foreach.php");
echo "\nTesting deep 'inheritance'...\n";
passthru("php ".__DIR__."/templates/inheritance.php");
echo "\nDone. Cleanup.\n";
passthru("rm -rf ".__DIR__."/compile/*");
passthru("rm -f ".__DIR__."/templates/inheritance/smarty/*");
passthru("rm -f ".__DIR__."/templates/inheritance/twig/*");
echo "\nSmarty3 vs Aspect (more details)\n\n";
echo "Coming soon\n";