PhpBench\Tests\Util\TestUtil::createCollection PHP Method

createCollection() public static method

public static createCollection ( array $suiteConfigs = [] )
$suiteConfigs array
    public static function createCollection(array $suiteConfigs = [])
    {
        $suites = [];
        foreach ($suiteConfigs as $suiteIndex => $suiteConfig) {
            $suites[] = self::createSuite($suiteConfig, $suiteIndex);
        }
        return new SuiteCollection($suites);
    }

Usage Example

示例#1
0
 public function benchStoreParams()
 {
     $uuid = uniqid();
     $collection = TestUtil::createCollection([['uuid' => $uuid . 'a', 'parameters' => ['one' => 'two', 'three' => 'four', 'two' => 'five', '7' => 'eight'], 'env' => ['foo' => ['foo' => 'bar', 'bar' => 'foo'], 'bar' => ['foo' => 'bar', 'bar' => 'foo'], 'baz' => ['foo' => 'bar', 'bar' => 'foo'], 'bog' => ['foo' => 'bar', 'bar' => 'foo']]], ['uuid' => $uuid . 'b'], ['uuid' => $uuid . 'c'], ['uuid' => $uuid . 'd']]);
     $this->driver->store($collection);
     $uuid++;
 }
All Usage Examples Of PhpBench\Tests\Util\TestUtil::createCollection