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

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 55 of file bench.php.

Member Function Documentation

◆ setUp()

ManyCallBacks::setUp ( )

Definition at line 59 of file bench.php.

References $i.

59  {
60 
61  $this->emitter = new EventEmitter();
62  for ($i = 0;$i < 100;$i++) {
63  $this->emitter->on('foo', function() {
64  // NOOP
65  });
66  }
67 
68  }
EventEmitter object.
$i
Definition: disco.tpl.php:19

◆ test()

ManyCallBacks::test ( )

Definition at line 70 of file bench.php.

References $i, and BenchMark\$iterations.

70  {
71 
72  for ($i = 0;$i < $this->iterations;$i++) {
73  $this->emitter->emit('foo', []);
74  }
75 
76  }
$iterations
Definition: bench.php:10
$i
Definition: disco.tpl.php:19

Field Documentation

◆ $emitter

ManyCallBacks::$emitter
protected

Definition at line 57 of file bench.php.


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