From 8df3db566a3a937b45ebf11adb90d265e6f5e2d4 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 17 Nov 2019 20:45:02 +0100 Subject: initial checking of customized version 1.0rc9 --- 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-54-g00ecf