Skip to content

Commit

Permalink
tests: Update CachingIteratorsAggregateBench.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jan 8, 2022
1 parent e351ad0 commit 6bfccf1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/benchmarks/CachingIteratorsAggregateBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,26 @@ public function provideGeneratorsWithOthers(): Generator
{
$items = 5000;

yield SimpleCachingIteratorAggregate::class => [
yield 'SimpleCachingIteratorAggregate' => [
'class' => SimpleCachingIteratorAggregate::class,
'size' => $items,
];

yield CachingIteratorAggregate::class => [
yield 'CachingIteratorAggregate' => [
'class' => CachingIteratorAggregate::class,
'size' => $items,
];

yield IterIterator::class => [
yield 'IterIterator' => [
'class' => IterIterator::class,
'size' => $items,
];
}


protected function doBench(Traversable $input, array $params): void
{
iterator_to_array($this->loopUntil($input, $params));
iterator_to_array($this->loop($input));
parent::doBench($input, $params);
}
}

0 comments on commit 6bfccf1

Please sign in to comment.