- Remove outputProfiling.
This commit is contained in:
@@ -744,27 +744,6 @@ class baseRouter
|
||||
if(!empty($this->config->debug) && $this->config->debug >= 3) $this->dbh->exec('SET profiling = 1');
|
||||
}
|
||||
|
||||
/**
|
||||
* 输出数据库性能采样结果(Server-Timing)。
|
||||
* Output database profiling(Server-Timing).
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
*/
|
||||
protected function outputProfiling(): void
|
||||
{
|
||||
if(empty($this->config->debug) || $this->config->debug < 3) return;
|
||||
|
||||
/* MySQL profiling. */
|
||||
$profiling = $this->dbh->query('SHOW PROFILES')->fetchAll(PDO::FETCH_ASSOC);
|
||||
foreach($profiling as $prof)
|
||||
{
|
||||
header('Server-Timing: db;desc="SQL: ' . $prof['Query'] . '";dur=' . $prof['Duration'] * 1000, false);
|
||||
}
|
||||
|
||||
header('Server-Timing: app;desc="PHP: Total";dur=' . (getTime() - $this->startTime) * 1000, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用Xhprof。
|
||||
* Setup xhprof.
|
||||
@@ -2336,7 +2315,6 @@ class baseRouter
|
||||
try {
|
||||
if(is_null($this->params) and !$this->setParams())
|
||||
{
|
||||
$this->outputProfiling();
|
||||
$this->outputXhprof();
|
||||
return false;
|
||||
}
|
||||
@@ -2346,7 +2324,6 @@ class baseRouter
|
||||
|
||||
call_user_func_array(array($module, $this->methodName), $this->params);
|
||||
$this->checkAPIFile();
|
||||
$this->outputProfiling();
|
||||
$this->outputXhprof();
|
||||
return $module;
|
||||
} catch (EndResponseException $endResponseException) {
|
||||
|
||||
Reference in New Issue
Block a user