ReferenceHelper Benchmarks

This commit is contained in:
MarkBaker
2022-06-15 21:56:44 +02:00
parent a9375b6dd7
commit 4606163f8b
5 changed files with 232 additions and 0 deletions
@@ -0,0 +1,47 @@
<?php
namespace PhpOffice\PhpSpreadsheetPerformance\ReferenceHelper;
class RemoveColumnBenchmark extends AbstractInsertDelete
{
public function __construct()
{
parent::__construct(78, 2048);
}
/**
* @Groups({"slow"})
* @revs(4)
* @Iterations(5)
* @OutputTimeUnit("seconds")
* @AfterMethods("tearDown")
*/
public function benchmarkRemoveColumnsEarly(): void
{
$this->spreadsheet->getActiveSheet()->removeColumn('C', 2);
}
/**
* @Groups({"slow"})
* @revs(4)
* @Iterations(5)
* @OutputTimeUnit("seconds")
* @AfterMethods("tearDown")
*/
public function benchmarkRemoveColumnsMid(): void
{
$this->spreadsheet->getActiveSheet()->removeColumn('AB', 2);
}
/**
* @Groups({"slow"})
* @revs(4)
* @Iterations(7)
* @OutputTimeUnit("seconds")
* @AfterMethods("tearDown")
*/
public function benchmarkRemoveColumnsLate(): void
{
$this->spreadsheet->getActiveSheet()->removeColumn('BX', 2);
}
}