ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
OneCallBack Class Reference
+ Inheritance diagram for OneCallBack:
+ Collaboration diagram for OneCallBack:

Public Member Functions

 setUp ()
 
 test ()
 
- Public Member Functions inherited from BenchMark
 setUp ()
 
 test ()
 
 go ()
 

Protected Attributes

 $emitter
 
 $iterations = 100000
 
- Protected Attributes inherited from BenchMark
 $startTime
 
 $iterations = 10000
 
 $totalTime
 

Detailed Description

Definition at line 31 of file bench.php.

Member Function Documentation

◆ setUp()

OneCallBack::setUp ( )

Definition at line 36 of file bench.php.

36  {
37 
38  $this->emitter = new EventEmitter();
39  $this->emitter->on('foo', function() {
40  // NOOP
41  });
42 
43  }
EventEmitter object.

◆ test()

OneCallBack::test ( )

Definition at line 45 of file bench.php.

References $i, and BenchMark\$iterations.

45  {
46 
47  for ($i = 0;$i < $this->iterations;$i++) {
48  $this->emitter->emit('foo', []);
49  }
50 
51  }
$i
Definition: disco.tpl.php:19

Field Documentation

◆ $emitter

OneCallBack::$emitter
protected

Definition at line 33 of file bench.php.

◆ $iterations

OneCallBack::$iterations = 100000
protected

Definition at line 34 of file bench.php.


The documentation for this class was generated from the following file: