Support > Elxis 2008 developers guide

Benchmark (Speed test)

(1/1)

datahell:
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) ---<?php 
$tstart = microtime(); //starts counter

//code here that you want to check execution time

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

--- End code ---

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

Navigation

[0] Message Index

Go to full version