Files
PhpSpreadsheet/tests/Performance/ReferenceHelper/InsertRowBenchmark.php
T
2022-06-15 21:56:44 +02:00

48 lines
1.0 KiB
PHP

<?php
namespace PhpOffice\PhpSpreadsheetPerformance\ReferenceHelper;
class InsertRowBenchmark extends AbstractInsertDelete
{
public function __construct()
{
parent::__construct(256, 512);
}
/**
* @Groups({"slow"})
* @revs(4)
* @Iterations(5)
* @OutputTimeUnit("seconds")
* @AfterMethods("tearDown")
*/
public function benchmarkInsertRowsEarly(): void
{
$this->spreadsheet->getActiveSheet()->insertNewRowBefore(2, 4);
}
/**
* @Groups({"slow"})
* @revs(4)
* @Iterations(7)
* @OutputTimeUnit("seconds")
* @AfterMethods("tearDown")
*/
public function benchmarkInsertRowsMid(): void
{
$this->spreadsheet->getActiveSheet()->insertNewRowBefore(255, 4);
}
/**
* @Groups({"slow"})
* @revs(4)
* @Iterations(11)
* @OutputTimeUnit("seconds")
* @AfterMethods("tearDown")
*/
public function benchmarkInsertRowsLate(): void
{
$this->spreadsheet->getActiveSheet()->insertNewRowBefore(510, 4);
}
}