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

Public Member Functions

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

Protected Attributes

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

Detailed Description

Definition at line 80 of file bench.php.

Member Function Documentation

◆ setUp()

ManyPrioritizedCallBacks::setUp ( )

Reimplemented from BenchMark.

Definition at line 84 of file bench.php.

84 {
85
86 $this->emitter = new EventEmitter();
87 for ($i = 0;$i < 100;$i++) {
88 $this->emitter->on('foo', function() {
89 }, 1000 - $i);
90 }
91
92 }
EventEmitter object.
$i
Definition: disco.tpl.php:19

References $i.

◆ test()

ManyPrioritizedCallBacks::test ( )

Reimplemented from BenchMark.

Definition at line 94 of file bench.php.

94 {
95
96 for ($i = 0;$i < $this->iterations;$i++) {
97 $this->emitter->emit('foo', []);
98 }
99
100 }
$iterations
Definition: bench.php:10

References $i, and BenchMark\$iterations.

Field Documentation

◆ $emitter

ManyPrioritizedCallBacks::$emitter
protected

Definition at line 82 of file bench.php.


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