Elxis CMS Forum

Support => Elxis 2008 developers guide => Topic started by: datahell on August 29, 2007, 18:48:08

Title: Benchmark (Speed test)
Post by: datahell on August 29, 2007, 18:48:08
Elxis 2008 allows you to check any code block for speed. The idea behind this is to be able to check alternative coding style (especially for database querries) till you find the fastest one. Faster code meens page loading time decrease and CPU/Mysql saving.

Usage:
Code: (php) [Select]
<?php 
$tstart 
microtime(); //starts counter

//code here that you want to check execution time

$dt stopBenchmark($tstartmicrotime()); //time taken (in msec) for the above code to be executed
?>


You can use directly stopBenchmark() function from everywhere in Elxis 2008+