Small fixes

This commit is contained in:
RainLoop Team 2014-08-28 18:18:07 +04:00
parent f92120a5a7
commit 5009546a91
7 changed files with 19 additions and 8 deletions

View file

@ -101,10 +101,12 @@ class Loader
Utils::FormatFileSize(\memory_get_peak_usage(true), 2); Utils::FormatFileSize(\memory_get_peak_usage(true), 2);
} }
self::SetStatistic('TimeDelta', \microtime(true) - self::GetStatistic('Inited')); $iTimeDelta = \microtime(true) - self::GetStatistic('Inited');
self::SetStatistic('TimeDelta', $iTimeDelta);
$aResult['statistic'] = self::$aSetStatistic; $aResult['statistic'] = self::$aSetStatistic;
$aResult['counts'] = self::$aIncStatistic; $aResult['counts'] = self::$aIncStatistic;
$aResult['time'] = $iTimeDelta;
} }
return $aResult; return $aResult;

View file

@ -79,6 +79,7 @@ abstract class Driver
\MailSo\Log\Enumerations\Type::SECURE => '[SECURE]', \MailSo\Log\Enumerations\Type::SECURE => '[SECURE]',
\MailSo\Log\Enumerations\Type::NOTE => '[NOTE]', \MailSo\Log\Enumerations\Type::NOTE => '[NOTE]',
\MailSo\Log\Enumerations\Type::TIME => '[TIME]', \MailSo\Log\Enumerations\Type::TIME => '[TIME]',
\MailSo\Log\Enumerations\Type::TIME_DELTA => '[TIME]',
\MailSo\Log\Enumerations\Type::MEMORY => '[MEMORY]', \MailSo\Log\Enumerations\Type::MEMORY => '[MEMORY]',
\MailSo\Log\Enumerations\Type::NOTICE => '[NOTICE]', \MailSo\Log\Enumerations\Type::NOTICE => '[NOTICE]',
\MailSo\Log\Enumerations\Type::WARNING => '[WARNING]', \MailSo\Log\Enumerations\Type::WARNING => '[WARNING]',

View file

@ -17,4 +17,5 @@ class Type
const NOTE = 5; const NOTE = 5;
const TIME = 6; const TIME = 6;
const MEMORY = 7; const MEMORY = 7;
const TIME_DELTA = 8;
} }

View file

@ -157,11 +157,18 @@ class Logger extends \MailSo\Base\Collection
if ($this->bUsed) if ($this->bUsed)
{ {
$aStatistic = \MailSo\Base\Loader::Statistic(); $aStatistic = \MailSo\Base\Loader::Statistic();
// $this->WriteDump($aStatistic, \MailSo\Log\Enumerations\Type::INFO); if (\is_array($aStatistic))
if (\is_array($aStatistic) && isset($aStatistic['php']['memory_get_peak_usage']))
{ {
$this->Write('Memory peak usage: '.$aStatistic['php']['memory_get_peak_usage'], if (isset($aStatistic['php']['memory_get_peak_usage']))
\MailSo\Log\Enumerations\Type::MEMORY); {
$this->Write('Memory peak usage: '.$aStatistic['php']['memory_get_peak_usage'],
\MailSo\Log\Enumerations\Type::MEMORY);
}
if (isset($aStatistic['time']))
{
$this->Write('Time delta: '.$aStatistic['time'], \MailSo\Log\Enumerations\Type::TIME_DELTA);
}
} }
} }
} }

File diff suppressed because one or more lines are too long

View file

@ -175,7 +175,7 @@
var menu = $(this).data('ui-autocomplete').menu, var menu = $(this).data('ui-autocomplete').menu,
$menuItems; $menuItems;
menu.element.width(widget.elements.ul.outerWidth()); menu.element.width(widget.elements.ul.outerWidth() - 6);
// auto-activate the result if it's the only one // auto-activate the result if it's the only one
if(widget.options.activateFinalResult){ if(widget.options.activateFinalResult){

File diff suppressed because one or more lines are too long