public function InitProfiler() { // If timing parameter is set, force the profiler to be on $timing = any($this->request["args"]["timing"], $this->cfg->servers["profiler"]["level"], 0); if (!empty($this->cfg->servers["profiler"]["percent"])) { if (rand() % 100 < $this->cfg->servers["profiler"]["percent"]) { $timing = 4; Profiler::$log = true; } } if (!empty($timing)) { Profiler::$enabled = true; Profiler::setLevel($timing); } }