Location: PHPKode > scripts > CBenchmark > cbenchmark/example2.php
<?php
/**
 * Example of using CBenchmark class to benchmark code coverage
 *
 */
require_once('clsBenchMark.php');
require_once('example.classes.php');
$bench=new CBenchmark();

/**
 * Benchmark Sqlite initialization
 */
$bench->Start('Init Sqlite');
$sqlite=new SQLite();
$sqlite->Open('c:\\myfile.db');
$bench->End('Init Sqlite');
/**
 * Benchmark MySQL initialization
 */
$bench->Start('Init MySQL');
$mysql=new MySQL();
$mysql->Open('localhost','root','','mytest');
$bench->End();

$bench->ShowResults();
?>
Return current item: CBenchmark