Extending bench.php & micro_bench.php with Xenforo specific patterns ?

Are you just trying to initalize the XenForo framework when the
Code:
hallo($a)
function runs?
 
not a php programmer hehe

just seeing if there's any specific xenforo php routines that can be quantified in a benchmark - indicative of xenforo performance when comparing php versions
 
Can initialize the framework using
Code:
$startTime = microtime(true);
$fileDir = dirname(__FILE__);

require($fileDir . '/library/XenForo/Autoloader.php');
XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . '/library');

XenForo_Application::initialize($fileDir . '/library', $fileDir);
XenForo_Application::set('page_start_time', $startTime);

$deps = new XenForo_Dependencies_Public();
$deps->preLoadData();

Just set $fileDir to the path for XenForo's root if the file isn't there already, then you should be able to run any of XenForo's functions
 
Thanks @Jake B.

Just a bit more elaboration and background one what I am looking to achieve.

I am working on adding multiple PHP-FPM version support to Centmin Mod and ran bench.php and micro_bench.php to compare PHP 5.6 vs 7.0 vs 7.1 at https://community.centminmod.com/th...p-fpm-versions-work-preview.11900/#post-50673.

Then it dawned on me as to whether there's any Xenforo specific php code that could be added to bench.php or micro_bench.php to simulate testing how Xenforo PHP related code would respond to different PHP version benchmarks. Guess it would be equivalent to running testing against Xenforo actual install just without the MySQL overhead involved to just test Xenforo specific PHP code/routines.

So along the lines of running modified bench.php and micro_bench.php with added Xenforo PHP specific execution patterns etc.
 
Top Bottom