[ Index ]
 

Code source de PHP PEAR 1.4.5

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/Benchmark/ -> Iterate.php (sommaire)

(pas de description)

Poids: 167 lignes (5 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 1 fichier
 Benchmark/Timer.php

Définit 1 class

Benchmark_Iterate:: (2 méthodes):
  run()
  get()


Classe: Benchmark_Iterate  - X-Ref

Provides timing and profiling information.

Example 1

<code>
<?php
require_once 'Benchmark/Iterate.php';

$benchmark = new Benchmark_Iterate;

function foo($string) {
print $string . '<br>';
}

$benchmark->run(100, 'foo', 'test');
$result = $benchmark->get();
?>
</code>

Example 2

<code>
<?php
require_once 'Benchmark/Iterate.php';

$benchmark = new Benchmark_Iterate;

class MyClass {
function foo($string) {
print $string . '<br>';
}
}

$benchmark->run(100, 'myclass::foo', 'test');
$result = $benchmark->get();
?>
</code>

Example 3

<code>
<?php
require_once 'Benchmark/Iterate.php';

$benchmark = new Benchmark_Iterate;

class MyClass {
function foo($string) {
print $string . '<br>';
}
}

$o = new MyClass();

$benchmark->run(100, 'o->foo', 'test');
$result = $benchmark->get();
?>
</code>

run()   X-Ref
Benchmarks a function or method.


get($simple_output = false)   X-Ref
Returns benchmark result.

$result[x           ] = execution time of iteration x
$result['mean'      ] = mean execution time
$result['iterations'] = number of iterations

return: array



Généré le : Sun Feb 25 14:08:00 2007 par Balluche grâce à PHPXref 0.7