Modified Profiler message.

This commit is contained in:
Alexander Demidov
2012-07-19 17:18:54 +04:00
parent a16a995ed3
commit 9d0e22ebd2
2 changed files with 5 additions and 5 deletions

View File

@ -23,7 +23,7 @@ class Profiler
private function __construct()
{
if (Config::get('PROFILER') == false) {
throw new GeneralException('Need to turn on PROFILER before use.');
throw new GeneralException('Need turn PROFILER before use.');
}
}
@ -82,7 +82,7 @@ class Profiler
$html = '<div style="clear:both; font:12px monospace; margin: 5px; white-space: pre;">'
. 'Elapsed time: ' . round(($this->end - $this->start) * 1000, 2) . 'ms.<br/>';
if (count($this->queries) == 0 && !Config::get('PROFILER_DETAILS')) {
$html .= 'Queries not counted. Turn PROFILER_DETAILS on true, if you want to profile queries.<br>';
$html .= 'Queries not counted. Turn PROFILER_DETAILS if you want to profile queries.<br/>';
} else {
$html .= 'Queries: ' . count($this->queries) . ' [' . round($queriesTime * 1000, 2) . ' ms]<br/>';
}
@ -104,7 +104,7 @@ class Profiler
$queriesTime += $query->getElapsed();
}
if (count($this->queries) == 0 && !Config::get('PROFILER_DETAILS')) {
FB::table('Queries not counted. Turn PROFILER_DETAILS on true, if you want to profile queries.', $table);
FB::table('Queries not counted. Turn PROFILER_DETAILS if you want to profile queries.', $table);
} else {
FB::table('Queries: ' . count($this->queries) . ' [' . round($queriesTime * 1000, 2) . ' ms]', $table);
}
@ -122,7 +122,7 @@ class Profiler
$html = str_pad(PHP_EOL, 60, '-', STR_PAD_LEFT);
$html .= 'Elapsed time: ' . round(($this->end - $this->start) * 1000, 2) . 'ms.' . PHP_EOL;
if (count($this->queries) == 0 && !Config::get('PROFILER_DETAILS')) {
$html .= 'Queries not counted. Turn PROFILER_DETAILS on true, if you want to profile queries.' . PHP_EOL;
$html .= 'Queries not counted. Turn PROFILER_DETAILS if you want to profile queries.' . PHP_EOL;
} else {
$html .= 'Queries: ' . count($this->queries) . ' [' . round($queriesTime * 1000, 2) . ' ms] ' . PHP_EOL;
}