mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
fix #572 debugPrint() 및 로그(DEBUG & 2)에 memory_get_peak_usage() 값을 표시하도록 개선
This commit is contained in:
parent
30a216a044
commit
a95ada55b1
2 changed files with 4 additions and 3 deletions
|
|
@ -164,12 +164,13 @@ class DisplayHandler extends Handler
|
|||
array(
|
||||
'Request / Response info >>> ' . $_SERVER['REQUEST_METHOD'] . ' / ' . Context::getResponseMethod(),
|
||||
array(
|
||||
array('Request URI', 'Request method', 'Response method', 'Response contents size'),
|
||||
array('Request URI', 'Request method', 'Response method', 'Response contents size', 'Memory peak usage'),
|
||||
array(
|
||||
sprintf("%s:%s%s%s%s", $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING'] ? '?' : '', $_SERVER['QUERY_STRING']),
|
||||
$_SERVER['REQUEST_METHOD'],
|
||||
Context::getResponseMethod(),
|
||||
$this->content_size . ' byte'
|
||||
$this->content_size . ' byte',
|
||||
FileHandler::filesize(memory_get_peak_usage())
|
||||
)
|
||||
)
|
||||
),
|
||||
|
|
|
|||
|
|
@ -776,7 +776,7 @@ function debugPrint($debug_output = NULL, $display_option = TRUE, $file = '_debu
|
|||
}
|
||||
$type = FirePHP::INFO;
|
||||
|
||||
$label = sprintf('[%s:%d] %s() (m:%s)', $file_name, $line_num, $function, FileHandler::filesize(memory_get_usage()));
|
||||
$label = sprintf('[%s:%d] %s() (Memory usage: current=%s, peak=%s)', $file_name, $line_num, $function, FileHandler::filesize(memory_get_usage()), FileHandler::filesize(memory_get_peak_usage()));
|
||||
|
||||
// Check a FirePHP option
|
||||
if($display_option === 'TABLE')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue