/**
* Returns the rendertime string
+ * @param int $limit Minimal limit for displaying the execution duration
*
* @return string the rendertime
*/
- public function getRendertimeString()
+ public function getRendertimeString(int $limit = 0)
{
$output = '';
$output .= "\nDatabase Read:\n";
foreach ($this->callstack["database"] as $func => $time) {
$time = round($time, 3);
- if ($time > 0) {
+ if ($time > $limit) {
$output .= $func . ": " . $time . "\n";
}
}
$output .= "\nDatabase Write:\n";
foreach ($this->callstack["database_write"] as $func => $time) {
$time = round($time, 3);
- if ($time > 0) {
+ if ($time > $limit) {
$output .= $func . ": " . $time . "\n";
}
}
$output .= "\nCache Read:\n";
foreach ($this->callstack["cache"] as $func => $time) {
$time = round($time, 3);
- if ($time > 0) {
+ if ($time > $limit) {
$output .= $func . ": " . $time . "\n";
}
}
$output .= "\nCache Write:\n";
foreach ($this->callstack["cache_write"] as $func => $time) {
$time = round($time, 3);
- if ($time > 0) {
+ if ($time > $limit) {
$output .= $func . ": " . $time . "\n";
}
}
$output .= "\nNetwork:\n";
foreach ($this->callstack["network"] as $func => $time) {
$time = round($time, 3);
- if ($time > 0) {
+ if ($time > $limit) {
$output .= $func . ": " . $time . "\n";
}
}