*/
private $rendertime;
+ /**
+ * True, if the Profiler should measure the whole rendertime including functions
+ *
+ * @return bool
+ */
+ public function isRendertime()
+ {
+ return $this->rendertime;
+ }
+
+ /**
+ * Updates the enabling of the current profiler
+ *
+ * @param bool $enabled
+ * @param bool $renderTime
+ */
+ public function update($enabled = false, $renderTime = false)
+ {
+ $this->enabled = $enabled;
+ $this->rendertime = $renderTime;
+ }
+
/**
* @param bool $enabled True, if the Profiler is enabled
* @param bool $renderTime True, if the Profiler should measure the whole rendertime including functions
]
);
- $output = $this->getRendertimeString();
- $logger->info($message . ": " . $output, ['action' => 'profiling']);
+ if ($this->isRendertime()) {
+ $output = $this->getRendertimeString();
+ $logger->info($message . ": " . $output, ['action' => 'profiling']);
+ }
}
/**