1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
<?php
namespace MabeEnumBench;
use MabeEnum\EnumSet;
use MabeEnumTest\TestAsset\Enum66;
/**
* Benchmark an EnumSet with 66 defined enumerators that's using an binary bitset internally.
*
* @link http://github.com/marc-mabe/php-enum for the canonical source repository
* @copyright 2020, Marc Bennewitz
* @license http://github.com/marc-mabe/php-enum/blob/master/LICENSE.txt New BSD License
*/
class EnumSet66Bench extends AbstractEnumSetBench
{
/**
* Will be called before every subject
*/
public function init()
{
$this->values = Enum66::getValues();
$this->enumerators = Enum66::getEnumerators();
$this->emptySet = new EnumSet(Enum66::class);
$this->fullSet = new EnumSet(Enum66::class, $this->enumerators);
}
}
|