Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
1c9d2f29
Commit
1c9d2f29
authored
Nov 20, 2015
by
Robert Lyon
Committed by
Gerrit Code Review
Nov 20, 2015
Browse files
Merge "Bug 1517228: perf_to_log function amd misisng data"
parents
7a0fef3e
e9584a54
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/mahara.php
View file @
1c9d2f29
...
...
@@ -2848,11 +2848,15 @@ function perf_to_log($info=null) {
}
$logstring
=
'PERF: '
.
strip_querystring
(
get_script_path
())
.
': '
;
$logstring
.
=
' memory_total: '
.
$info
[
'memory_total'
]
.
'B ('
.
display_size
(
$info
[
'memory_total'
])
.
') memory_growth: '
.
$info
[
'memory_growth'
]
.
'B ('
.
display_size
(
$info
[
'memory_growth'
])
.
')'
;
if
(
isset
(
$info
[
'memory_total'
])
&&
isset
(
$info
[
'memory_growth'
]))
{
$logstring
.
=
' memory_total: '
.
$info
[
'memory_total'
]
.
'B ('
.
display_size
(
$info
[
'memory_total'
])
.
') memory_growth: '
.
$info
[
'memory_growth'
]
.
'B ('
.
display_size
(
$info
[
'memory_growth'
])
.
')'
;
}
$logstring
.
=
' time: '
.
$info
[
'realtime'
]
.
's'
;
$logstring
.
=
' includecount: '
.
$info
[
'includecount'
];
$logstring
.
=
' dbqueries: '
.
$info
[
'dbreads'
]
.
' reads, '
.
$info
[
'dbwrites'
]
.
' writes, '
.
$info
[
'dbcached'
]
.
' cached'
;
$logstring
.
=
' ticks: '
.
$info
[
'ticks'
]
.
' user: '
.
$info
[
'utime'
]
.
' sys: '
.
$info
[
'stime'
]
.
' cuser: '
.
$info
[
'cutime'
]
.
' csys: '
.
$info
[
'cstime'
];
if
(
isset
(
$info
[
'ticks'
])
&&
isset
(
$info
[
'utime'
])
&&
isset
(
$info
[
'stime'
])
&&
isset
(
$info
[
'cutime'
])
&&
isset
(
$info
[
'cstime'
]))
{
$logstring
.
=
' ticks: '
.
$info
[
'ticks'
]
.
' user: '
.
$info
[
'utime'
]
.
' sys: '
.
$info
[
'stime'
]
.
' cuser: '
.
$info
[
'cutime'
]
.
' csys: '
.
$info
[
'cstime'
];
}
$logstring
.
=
' serverload: '
.
$info
[
'serverload'
];
log_debug
(
$logstring
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment