Profiler - staffcheck/api GitHub Wiki

Profiler

  • Class name: Profiler
  • Namespace:

Properties

$description

public mixed $description
  • Visibility: public

$startTime

public mixed $startTime
  • Visibility: public

$endTime

public mixed $endTime
  • Visibility: public

$initTime

public mixed $initTime
  • Visibility: public

$cur_timer

public mixed $cur_timer
  • Visibility: public

$stack

public mixed $stack
  • Visibility: public

$trail

public mixed $trail
  • Visibility: public

$trace

public mixed $trace
  • Visibility: public

$count

public mixed $count
  • Visibility: public

$running

public mixed $running
  • Visibility: public

Methods

__construct

mixed Profiler::__construct($output_enabled, $trace_enabled)

Initialise the timer. with the current micro time

  • Visibility: public

Arguments

  • $output_enabled mixed
  • $trace_enabled mixed

startTimer

mixed Profiler::startTimer(string $name, string $desc)

Start an individual timer This will pause the running timer and place it on a stack.

  • Visibility: public

Arguments

  • $name string - name of the timer
  • $desc string - optional $desc description of the timer

stopTimer

mixed Profiler::stopTimer(string $name)

Stop an individual timer Restart the timer that was running before this one

  • Visibility: public

Arguments

  • $name string - name of the timer

elapsedTime

mixed Profiler::elapsedTime($name)

measure the elapsed time of a timer without stoping the timer if it is still running

  • Visibility: public

Arguments

  • $name mixed

elapsedOverall

mixed Profiler::elapsedOverall()

Measure the elapsed time since the profile class was initialised

  • Visibility: public

printTimers

mixed Profiler::printTimers($enabled)

print out a log of all the timers that were registered

  • Visibility: public

Arguments

  • $enabled mixed

printTrace

mixed Profiler::printTrace(boolean $enabled)
  • Visibility: public

Arguments

  • $enabled boolean

getMicroTime

mixed Profiler::getMicroTime()

Get the current time as accuratly as possible

  • Visibility: public

__resumeTimer

mixed Profiler::__resumeTimer($name)

resume an individual timer

  • Visibility: public

Arguments

  • $name mixed

__suspendTimer

mixed Profiler::__suspendTimer($name)

suspend an individual timer

  • Visibility: public

Arguments

  • $name mixed
⚠️ **GitHub.com Fallback** ⚠️