mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Update to 1.1
Read CHANGELOG.md#1.1.0
This commit is contained in:
@ -1,5 +1,35 @@
|
||||
<?php
|
||||
require_once __DIR__.'/scripts/bootstrap.php';
|
||||
|
||||
$opt = getopt("h", array(
|
||||
/** @var string $message */
|
||||
"cleanup",
|
||||
/** @var boolean $stress */
|
||||
"stress:",
|
||||
/** @var boolean $auto_reload */
|
||||
"auto_reload",
|
||||
/** @vat boolean $help */
|
||||
/** @vat boolean $h */
|
||||
"help"
|
||||
));
|
||||
|
||||
$opt += array(
|
||||
"stress" => 0
|
||||
);
|
||||
|
||||
extract($opt);
|
||||
|
||||
if(isset($h) || isset($help)) {
|
||||
echo "
|
||||
Start: ".basename(__FILE__)." [--stress COUNT] [--auto_reload] [--cleanup]
|
||||
Usage: ".basename(__FILE__)." [--help | -h]
|
||||
";
|
||||
exit;
|
||||
}
|
||||
|
||||
Benchmark::$stress = intval($stress);
|
||||
Benchmark::$auto_reload = isset($auto_reload);
|
||||
|
||||
exec("rm -rf ".__DIR__."/compile/*");
|
||||
|
||||
echo "Smarty3 vs Twig vs Fenom\n\n";
|
||||
@ -17,7 +47,6 @@ Benchmark::runs("fenom", 'echo/smarty.tpl', __DIR__.'/templates/echo/data.js
|
||||
//if(extension_loaded("phalcon")) {
|
||||
// Benchmark::runs("volt", 'echo/twig.tpl', __DIR__.'/templates/echo/data.json');
|
||||
//}
|
||||
|
||||
echo "\nTesting 'foreach' of big array...\n";
|
||||
|
||||
Benchmark::runs("smarty3", 'foreach/smarty.tpl', __DIR__.'/templates/foreach/data.json');
|
||||
@ -36,11 +65,10 @@ Benchmark::runs("fenom", 'inheritance/smarty/b100.tpl', __DIR__.'/templates/for
|
||||
// Benchmark::runs("volt", 'inheritance/twig/b100.tpl', __DIR__.'/templates/foreach/data.json');
|
||||
//}
|
||||
|
||||
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 Fenom (more details)\n\n";
|
||||
|
||||
echo "Coming soon\n";
|
||||
echo "\nDone\n";
|
||||
if(isset($cleanup)) {
|
||||
echo "Cleanup.\n";
|
||||
passthru("rm -rf ".__DIR__."/compile/*");
|
||||
passthru("rm -f ".__DIR__."/templates/inheritance/smarty/*");
|
||||
passthru("rm -f ".__DIR__."/templates/inheritance/twig/*");
|
||||
}
|
||||
|
Reference in New Issue
Block a user