Browse Source

Method info on profiler

master
Anton Terekhov 13 years ago
parent
commit
4c408292f2
  1. 2
      model/MySQLiStatement.php
  2. 4
      redis/RedisDebug.php

2
model/MySQLiStatement.php

@ -84,7 +84,7 @@ class MySQLiStatement extends DbStatement
*/
$mysqli = $this->driver->getConnection();
if (DEBUG) {
$profiler = Profiler::getInstance()->profilerCommand('mysql', $sql);
$profiler = Profiler::getInstance()->profilerCommand('MySQL', $sql);
$result = $mysqli->query($sql);
$profiler->end();
} else {

4
redis/RedisDebug.php

@ -23,8 +23,8 @@ class RedisDebug
public function __call($name, $arguments)
{
$command = $name . '(' . $this->r_implode(', ', $arguments) . ')';
$profiler = Profiler::getInstance()->profilerCommand('redis', $command);
$command = $this->r_implode(', ', $arguments);
$profiler = Profiler::getInstance()->profilerCommand('Redis->' . $name, $command);
$data = call_user_func_array(array($this->redis, $name), $arguments);
$profiler->end();
return $data;

Loading…
Cancel
Save