Records the debugger and system start time

@return void
355425
public static function start()
    {

        static::$time = microtime(true);
        static::$memory = memory_get_usage(true);

        self::log(static::$time, _t("Start execution time"), "info");
    }
730508
private function debug()
    {
        if (!empty($this->_errorCallbackFunction)) {
            $error = array("Error" => $this->_error);
            if (!empty($this->_sql))
                $error["SQL Statement"] = $this->_sql;
            if (!empty($this->_bind))
                $error["Bind Parameters"] = trim(print_r($this->_bind, true));

            $backtrace = debug_backtrace();
            if (!empty($backtrace)) {
                foreach ($backtrace as $info) {
                    if (isset($info["file"]) && $info["file"] != __FILE__)
                        $error["Backtrace_Line_" . $info["line"]] = $info["file"] . " at line " . $info["line"];
                }
            }

            $msg = "";

            $msg .= "SQL Error\n" . str_repeat("-", 50);
            foreach ($error as $key => $val) {
                $msg .= "\n\n$key:\n$val";
            }

            $this->logger->error($msg);
        }
    }
1252499
public function elapsedTime() {
        $currentTime = microtime(true);
        if ($this->startTime === null) {
            $this->startTime            = $currentTime;
            $this->finishTime           = $currentTime;
        } else {
            $this->finishTime           = $currentTime;
            $this->elapsedTimeFromStart = $currentTime - $this->startTime;
        }
    }
949349
def log_starting(self):
		""""""
		self.start_time = time.perf_counter()
		logger.log("Starting '", logger.cyan(self.name), "'...")
170198
public function main()
    {

        // log the configured deployment directory
        $this->getSystemLogger()->debug(
            sprintf(
                "Start watching heartbeat file %s",
                $this->getHeartbeatFile()
            )
        );

        // wait until the server has been successfully started at least once
        while ($this->getLastFileTouch($this->getHeartbeatFile()) === 0) {
            $this->getSystemLogger()->debug('Heartbeat scanner is waiting for first successful startup ...');
            sleep(1);
        }

        // watch the heartbeat file
        while (true) {
            // load the current file change time of the heartbeat file and store it
            $oldMTime = $this->getLastFileTouch($this->getHeartbeatFile());

            // Get the current time
            $currentTime = time();

            // log the found directory hash value
            $this->getSystemLogger()->debug(
                sprintf(
                    "Comparing heartbeat mTimes %s (previous) : %s (actual)",
                    $oldMTime,
                    $currentTime
                )
            );

            // compare the mTime values, if they differ more than allowed we have to take action
            if (($currentTime - $oldMTime) > self::HEARTBEAT_INTERVAL) {
                // log that changes have been found
                $this->getSystemLogger()->debug(
                    sprintf(
                        "Found heartbeat missing for %s seconds.",
                        $currentTime - $oldMTime
                    )
                );

                // as long as the heartbeat does not come back up we will try to restart the appserver
                while ($oldMTime === $this->getLastFileTouch($this->getHeartbeatFile())) {
                    // tell them we try to restart
                    $this->getSystemLogger()->debug("Will try to restart the appserver.");

                    // restart the appserver
                    $this->restart();

                    // wait until restart has been finished, but only wait for so long
                    for ($i = 0; $i <= self::RESTART_INTERVAL; $i ++) {
                        // sleep a little
                        sleep(1);
                    }
                }

                // log that the appserver has been restarted successfully
                $this->getSystemLogger()->debug("appserver has successfully been restarted.");

            } else {
                // if no changes has been found, wait a second
                sleep(1);
            }
        }
    }
958680
protected function setupDebug()
    {
        foreach ($this->sources as $source) {
            $source->setMinifier(array('Minify_Lines', 'minify'));
            $id = $source->getId();
            $source->setMinifierOptions(array(
                'id' => (is_file($id) ? basename($id) : $id),
            ));
        }
    }
784312
public function debug() {
		$debug = parent::debug();
		$debug['sqlCount'] = $this->sqlCnt;
		if ($this->dbError) {
			$debug['dbError'] = $this->dbError;
		}
		return $debug;
	}
1162186
public function start()
	{
		if(!self::$isStarted){
			$this->session();
			$this->setDefaultTimezone();
			$this->registerErrorhandler();
			self::$isStarted = true;
		}
	}
116964
public function debug()
    {
        if (is_null($this->debug)) {
            $this->debug = app(Debug::class);
        }

        return $this->debug;
    }
591698
public function before()
    {

        // ~ Init timer
        $this->time = - microtime(true);

        // ~ Reporting all error (default: all error) !
        error_reporting((int) $this->argument->get('error-reporting', null, - 1));
        ini_set('display_errors', (bool) $this->argument->get('error-display', null, 1));

        // ~ Set limit time to 0 (default: unlimited) !
        set_time_limit((int) $this->argument->get('time-limit', null, 0));

        $this->isVerbose = ! $this->argument->has('quiet');
    }
1016148
public function debug() {
        echo "filePath    = " . $this->filePath . PHP_EOL;
        echo "startMarker = " . $this->startMarker . PHP_EOL;
        echo "endMarker   = " . $this->endMarker . PHP_EOL;
        echo "startIndex  = " . $this->startIndex . PHP_EOL;
        echo "endIndex    = " . $this->endIndex . PHP_EOL;
        echo "numLines    = " . $this->numLines . PHP_EOL;
        echo "Start       = " . print_r($this->beforeLines, true);
        echo "Auto      = " . print_r($this->autoLines, true);
        echo "End         = " . print_r($this->afterLines, true);
        return $this;
    }
939583
public function debug()
    {
        Debug::show($this->javascript);
        Debug::show($this->css);
        Debug::show($this->customCSS);
        Debug::show($this->customScript);
        Debug::show($this->customHeadTags);
        Debug::show($this->combinedFiles);
    }
436421
public function execute() {

		foreach($this -> stmt as $stmt) {
			$this -> executeStatement($stmt);
		}

		$this -> shadow = $this -> stmt;
		$this -> reset();

		//Write time for debugging
		$this -> trace = microtime(true) - $this -> trace;

		return true;
	}
694645
protected function starting_output() {
        global $CFG;

        if (!during_initial_install()) {
            $this->blocks->load_blocks();
            if (empty($this->_block_actions_done)) {
                $this->_block_actions_done = true;
                if ($this->blocks->process_url_actions($this)) {
                    redirect($this->url->out(false));
                }
            }
            $this->blocks->create_all_block_instances();
        }

        // If maintenance mode is on, change the page header.
        if (!empty($CFG->maintenance_enabled)) {
            $this->set_button('<a href="' . $CFG->wwwroot . '/' . $CFG->admin .
                    '/settings.php?section=maintenancemode">' . get_string('maintenancemode', 'admin') .
                    '</a> ' . $this->button);

            $title = $this->title;
            if ($title) {
                $title .= ' - ';
            }
            $this->set_title($title . get_string('maintenancemode', 'admin'));
        }

        $this->initialise_standard_body_classes();
    }
766883
public function record(ResolveInfo $resolveInfo, $start, $end): void
    {
        $this->resolverTraces [] = [
            'path' => $resolveInfo->path,
            'parentType' => $resolveInfo->parentType->name,
            'returnType' => $resolveInfo->returnType->__toString(),
            'fieldName' => $resolveInfo->fieldName,
            'startOffset' => $this->diffTimeInNanoseconds($this->requestStartPrecise, $start),
            'duration' => $this->diffTimeInNanoseconds($start, $end),
        ];
    }
1281103
public function publishTimedRecords()
    {
        foreach ($this->contentTypeNames as $contentTypeName) {
            $this->timedHandleRecords($contentTypeName, 'timed');
        }
        $this->cache->save(self::CACHE_KEY_PUBLISH, true, $this->interval);
    }
1185439
public function debugGet() {
		$aResult = $this->_coll()->findOne([static::$_mKey => $this->_mID]);
		unset($aResult[static::$_mKey]);
		return $aResult;
	}