mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-11-13 05:27:01 +00:00
ReferenceHelper Benchmarks
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user