bench/EnumMapBench.php 1 location
|
@@ 40-50 (lines=11) @@
|
37 |
|
/** |
38 |
|
* Will be called before every subject |
39 |
|
*/ |
40 |
|
public function init() |
41 |
|
{ |
42 |
|
$this->values = Enum66::getValues(); |
43 |
|
$this->enumerators = Enum66::getEnumerators(); |
44 |
|
|
45 |
|
$this->emptyMap = new EnumMap(Enum66::class); |
46 |
|
$this->fullMap = new EnumMap(Enum66::class); |
47 |
|
foreach ($this->enumerators as $i => $enumerator) { |
48 |
|
$this->fullMap->offsetSet($enumerator, $i); |
49 |
|
} |
50 |
|
} |
51 |
|
|
52 |
|
public function benchOffsetSetEnumerator() |
53 |
|
{ |
bench/EnumSet32Bench.php 1 location
|
@@ 41-51 (lines=11) @@
|
38 |
|
/** |
39 |
|
* Will be called before every subject |
40 |
|
*/ |
41 |
|
public function init() |
42 |
|
{ |
43 |
|
$this->values = Enum32::getValues(); |
44 |
|
$this->enumerators = Enum32::getEnumerators(); |
45 |
|
|
46 |
|
$this->emptySet = new EnumSet(Enum32::class); |
47 |
|
$this->fullSet = new EnumSet(Enum32::class); |
48 |
|
foreach ($this->enumerators as $enumerator) { |
49 |
|
$this->fullSet->attach($enumerator); |
50 |
|
} |
51 |
|
} |
52 |
|
|
53 |
|
public function benchAttachEnumerator() |
54 |
|
{ |
bench/EnumSet66Bench.php 1 location
|
@@ 41-51 (lines=11) @@
|
38 |
|
/** |
39 |
|
* Will be called before every subject |
40 |
|
*/ |
41 |
|
public function init() |
42 |
|
{ |
43 |
|
$this->values = Enum66::getValues(); |
44 |
|
$this->enumerators = Enum66::getEnumerators(); |
45 |
|
|
46 |
|
$this->emptySet = new EnumSet(Enum66::class); |
47 |
|
$this->fullSet = new EnumSet(Enum66::class); |
48 |
|
foreach ($this->enumerators as $enumerator) { |
49 |
|
$this->fullSet->attach($enumerator); |
50 |
|
} |
51 |
|
} |
52 |
|
|
53 |
|
public function benchAttachEnumeratorOnEmpty() |
54 |
|
{ |