Benchmark
[ class tree: Benchmark ] [ index: Benchmark ] [ all elements ]

File: Profiler.php

Source Location: /Benchmark-1.2.1/Profiler.php

Page Details:

Includes:

require_once('PEAR.php') [line 60]
Benchmark::Profiler

Purpose:

Timing Script Execution, Generating Profiling Information

Example with automatic profiling start, stop, and output:

$profiler =& new Benchmark_Profiler(true); function myFunction() { $profiler->enterSection('myFunction'); //do something $profiler->leaveSection('myFunction'); return; } //do something myFunction(); //do more

Example without automatic profiling:

$profiler =& new Benchmark_Profiler(); function myFunction() { $profiler->enterSection('myFunction'); //do something $profiler->leaveSection('myFunction'); return; } $profiler->start(); //do something myFunction(); //do more $profiler->stop(); $profiler->display();


Documentation generated on Fri, 30 Apr 2004 23:22:15 +0200 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.