$this->reset();
}
+ /**
+ * Start a profiler recording
+ *
+ * @param string $value
+ * @return void
+ */
public function startRecording(string $value)
{
if (!$this->enabled) {
$this->timestamps[] = ['value' => $value, 'stamp' => microtime(true), 'credit' => 0];
}
+ /**
+ * Stop a profiler recording
+ *
+ * @param string $callstack
+ * @return void
+ */
public function stopRecording(string $callstack = '')
{
if (!$this->enabled || empty($this->timestamps)) {
$callstack = $callstack ?: System::callstack(4, $value == 'rendering' ? 0 : 1);
if (!isset($this->performance[$value])) {
- // Prevent ugly E_NOTICE
$this->performance[$value] = 0;
}
$this->performance['network'] = 0;
$this->performance['file'] = 0;
$this->performance['rendering'] = 0;
- $this->performance['parser'] = 0;
+ $this->performance['session'] = 0;
$this->performance['marktime'] = 0;
$this->performance['marktime'] = microtime(true);
$this->performance['classcreate'] = 0;
$this->callstack['network'] = [];
$this->callstack['file'] = [];
$this->callstack['rendering'] = [];
- $this->callstack['parser'] = [];
+ $this->callstack['session'] = [];
}
/**
}
}
}
+
if (isset($this->callstack["rendering"])) {
$output .= "\nRendering:\n";
foreach ($this->callstack["rendering"] as $func => $time) {