Class PHPCrawlerBenchmark

Description

A static benchmark-class for doing benchmarks within phpcrawl.

Example:

  1.  PHPCrawlerBenchmark::start("benchmark1");
  2.  sleep(2);
  3.  PHPCrawlerBenchmark::stop("benchmark1");
  4.  echo PHPCrawlerBenchmark::getElapsedTime("benchmark1");

Located in /libs/PHPCrawler/PHPCrawlerBenchmark.class.php (line 16)


	
			
Variable Summary
static mixed $benchmark_results
static mixed $benchmark_startcount
static mixed $benchmark_starttimes
static mixed $temporary_benchmarks
Method Summary
static array getAllBenchmarks ()
static void getCallCount ( $identifier)
static float getElapsedTime (string $identifier)
static float getmicrotime ()
static void printAllBenchmarks ([ $linebreak = "<br />"])
static void reset ( $identifier)
static void resetAll ([ $retain_benchmarks = array()], array $retain_benachmarks)
static void start ( $identifier, [bool $temporary_benchmark = false], string $identifie)
static void stop (string $identifier)
Variables
static mixed $benchmark_results = array() (line 18)
  • access: protected
static mixed $benchmark_startcount = array() (line 20)
  • access: protected
static mixed $benchmark_starttimes = array() (line 19)
  • access: protected
static mixed $temporary_benchmarks = array() (line 21)
  • access: protected
Methods
static method getAllBenchmarks (line 129)

Returns all registered benchmark-results.

  • return: associative Array. The keys are the benchmark-identifiers, the values the benchmark-times.
  • access: public
static array getAllBenchmarks ()
static method getCallCount (line 44)
  • access: public
static void getCallCount ( $identifier)
  • $identifier
static method getElapsedTime (line 71)

Gets the elapsed time for the given benchmark.

  • return: The elapsed time in seconds and miliseconds (e.g. 1.74343)
  • access: public
static float getElapsedTime (string $identifier)
  • string $identifier: The benchmark name/identifier.
static method getmicrotime (line 147)

Returns the current time in seconds and milliseconds.

  • access: public
static float getmicrotime ()
static method printAllBenchmarks (line 115)
  • access: public
static void printAllBenchmarks ([ $linebreak = "<br />"])
  • $linebreak
static method reset (line 82)

Resets the clock for the given benchmark.

  • access: public
static void reset ( $identifier)
  • $identifier
static method resetAll (line 95)

Resets all clocks for all benchmarks.

  • access: public
static void resetAll ([ $retain_benchmarks = array()], array $retain_benachmarks)
  • array $retain_benachmarks: Optional. Numeric array containing benchmark-identifiers that should NOT get resetted.
  • $retain_benchmarks
static method start (line 30)

Starts the clock for the given benchmark.

  • access: public
static void start ( $identifier, [bool $temporary_benchmark = false], string $identifie)
  • string $identifie: The benchmark name/identifier.
  • bool $temporary_benchmark: If set to TRUE, the benchmark will not be returned by methods like getAllBenchmarks() and printAllBenchmarks()
  • $identifier
static method stop (line 54)

Stops the benchmark-clock for the given benchmark.

  • access: public
static void stop (string $identifier)
  • string $identifier: The benchmark name/identifier.

Documentation generated on Sun, 20 Jan 2013 21:18:50 +0200 by phpDocumentor 1.4.4