resolve conflict, comment out my custom database code that I use
authorMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 10 Jun 2009 16:28:50 +0000 (12:28 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 10 Jun 2009 16:29:51 +0000 (12:29 -0400)
for profiling these tests.

framework/Image/tests/im.php

index 17440b3..d3a3130 100644 (file)
@@ -10,6 +10,8 @@
 define('HORDE_BASE', '/var/www/html/horde');
 define('AUTH_HANDLER', true);
 require_once HORDE_BASE . '/lib/base.php';
+$GLOBALS['conf']['sql']['adapter'] = $GLOBALS['conf']['sql']['phptype'] == 'mysqli' ? 'mysqli' : 'pdo_' . $GLOBALS['conf']['sql']['phptype'];
+$db = Horde_Db_Adapter::factory($GLOBALS['conf']['sql']);
 
 // Putting these here so they don't interfere with timing/memory data when
 // profiling.
@@ -422,4 +424,11 @@ function logThis($effect, $time, $memory)
     global $driver, $logger;
 
     $logger->debug("$driver, $effect, $time, $memory");
+
+//    global $driver, $logger, $db;
+//    $sql = "INSERT INTO image_tests (test, driver, peak_memory, execution_time) VALUES (?, ?, ?, ?);";
+//    $db->insert($sql, array('test' => $effect,
+//                                     'driver' => $driver,
+//                                     'peak_memory' => $memory,
+//                                     'execution_time' => $time));
 }