From 6854cb3f4d8219cf1829e32122eb2502a916eae9 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 1 Feb 2020 09:05:48 +0100 Subject: initial checkin --- vendor/adodb/adodb-php/tests/benchmark.php | 86 ++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 vendor/adodb/adodb-php/tests/benchmark.php (limited to 'vendor/adodb/adodb-php/tests/benchmark.php') diff --git a/vendor/adodb/adodb-php/tests/benchmark.php b/vendor/adodb/adodb-php/tests/benchmark.php new file mode 100644 index 0000000..afb044b --- /dev/null +++ b/vendor/adodb/adodb-php/tests/benchmark.php @@ -0,0 +1,86 @@ + + + + + ADODB Benchmarks + + + +ADODB Version: $ADODB_version Host: $db->host   Database: $db->database"; + + // perform query once to cache results so we are only testing throughput + $rs = $db->Execute($sql); + if (!$rs){ + print "Error in recordset

"; + return; + } + $arr = $rs->GetArray(); + //$db->debug = true; + global $ADODB_COUNTRECS; + $ADODB_COUNTRECS = false; + $start = microtime(); + for ($i=0; $i < $max; $i++) { + $rs = $db->Execute($sql); + $arr = $rs->GetArray(); + // print $arr[0][1]; + } + $end = microtime(); + $start = explode(' ',$start); + $end = explode(' ',$end); + + //print_r($start); + //print_r($end); + + // print_r($arr); + $total = $end[0]+trim($end[1]) - $start[0]-trim($start[1]); + printf ("

seconds = %8.2f for %d iterations each with %d records

",$total,$max, sizeof($arr)); + flush(); + + + //$db->Close(); +} +include("testdatabases.inc.php"); + +?> + + + + -- cgit v1.2.3-70-g09d2