protected function _addProfile($time, $spec, $data = null)
{
if (!$this->_profiling) {
return;
}
if ($spec instanceof PDOStatement) {
$conn = $spec->solar_conn;
$stmt = $spec->queryString;
} else {
$conn = null;
$stmt = $spec;
}
$timespan = microtime(true) - $time;
$e = new Exception();
$this->_profile[] = array('time' => $timespan, 'stmt' => $stmt, 'data' => $data, 'conn' => $conn, 'trace' => $e->getTraceAsString());
}