mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-31 12:40:00 +00:00
Add benchmark for merging cells
This commit is contained in:
+6
-6
@@ -82,15 +82,15 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "dev-master",
|
||||
"dompdf/dompdf": "^1.0 || ^2.0",
|
||||
"friendsofphp/php-cs-fixer": "^3.2",
|
||||
"dompdf/dompdf": "^2.0",
|
||||
"friendsofphp/php-cs-fixer": "^3.13",
|
||||
"mitoteam/jpgraph": "^10.2.4",
|
||||
"mpdf/mpdf": "^8.1.1",
|
||||
"mpdf/mpdf": "^8.1.2",
|
||||
"phpbench/phpbench": "^1.2",
|
||||
"phpcompatibility/php-compatibility": "^9.3",
|
||||
"phpstan/phpstan": "^1.1",
|
||||
"phpstan/phpstan-phpunit": "^1.0",
|
||||
"phpunit/phpunit": "^8.5 || ^9.0",
|
||||
"phpstan/phpstan": "^1.9",
|
||||
"phpstan/phpstan-phpunit": "^1.2",
|
||||
"phpunit/phpunit": "^9.0",
|
||||
"squizlabs/php_codesniffer": "^3.7",
|
||||
"tecnickcom/tcpdf": "^6.5"
|
||||
},
|
||||
|
||||
Generated
+435
-130
File diff suppressed because it is too large
Load Diff
@@ -12,7 +12,7 @@ class InsertColumnBenchmark extends AbstractInsertDelete
|
||||
/**
|
||||
* @Groups({"slow"})
|
||||
* @revs(4)
|
||||
* @Iterations(5)
|
||||
* @Iterations(4)
|
||||
* @OutputTimeUnit("milliseconds")
|
||||
* @AfterMethods("tearDown")
|
||||
*/
|
||||
@@ -24,7 +24,7 @@ class InsertColumnBenchmark extends AbstractInsertDelete
|
||||
/**
|
||||
* @Groups({"slow"})
|
||||
* @revs(4)
|
||||
* @Iterations(5)
|
||||
* @Iterations(4)
|
||||
* @OutputTimeUnit("milliseconds")
|
||||
* @AfterMethods("tearDown")
|
||||
*/
|
||||
|
||||
@@ -12,7 +12,7 @@ class InsertRowBenchmark extends AbstractInsertDelete
|
||||
/**
|
||||
* @Groups({"slow"})
|
||||
* @revs(4)
|
||||
* @Iterations(5)
|
||||
* @Iterations(4)
|
||||
* @OutputTimeUnit("milliseconds")
|
||||
* @AfterMethods("tearDown")
|
||||
*/
|
||||
@@ -24,7 +24,7 @@ class InsertRowBenchmark extends AbstractInsertDelete
|
||||
/**
|
||||
* @Groups({"slow"})
|
||||
* @revs(4)
|
||||
* @Iterations(7)
|
||||
* @Iterations(4)
|
||||
* @OutputTimeUnit("milliseconds")
|
||||
* @AfterMethods("tearDown")
|
||||
*/
|
||||
@@ -36,7 +36,7 @@ class InsertRowBenchmark extends AbstractInsertDelete
|
||||
/**
|
||||
* @Groups({"slow"})
|
||||
* @revs(4)
|
||||
* @Iterations(11)
|
||||
* @Iterations(7)
|
||||
* @OutputTimeUnit("milliseconds")
|
||||
* @AfterMethods("tearDown")
|
||||
*/
|
||||
|
||||
@@ -12,7 +12,7 @@ class RemoveColumnBenchmark extends AbstractInsertDelete
|
||||
/**
|
||||
* @Groups({"slow"})
|
||||
* @revs(4)
|
||||
* @Iterations(5)
|
||||
* @Iterations(4)
|
||||
* @OutputTimeUnit("milliseconds")
|
||||
* @AfterMethods("tearDown")
|
||||
*/
|
||||
@@ -24,7 +24,7 @@ class RemoveColumnBenchmark extends AbstractInsertDelete
|
||||
/**
|
||||
* @Groups({"slow"})
|
||||
* @revs(4)
|
||||
* @Iterations(5)
|
||||
* @Iterations(4)
|
||||
* @OutputTimeUnit("milliseconds")
|
||||
* @AfterMethods("tearDown")
|
||||
*/
|
||||
|
||||
@@ -12,7 +12,7 @@ class RemoveRowBenchmark extends AbstractInsertDelete
|
||||
/**
|
||||
* @Groups({"slow"})
|
||||
* @revs(4)
|
||||
* @Iterations(5)
|
||||
* @Iterations(4)
|
||||
* @OutputTimeUnit("milliseconds")
|
||||
* @AfterMethods("tearDown")
|
||||
*/
|
||||
@@ -24,7 +24,7 @@ class RemoveRowBenchmark extends AbstractInsertDelete
|
||||
/**
|
||||
* @Groups({"slow"})
|
||||
* @revs(4)
|
||||
* @Iterations(7)
|
||||
* @Iterations(4)
|
||||
* @OutputTimeUnit("milliseconds")
|
||||
* @AfterMethods("tearDown")
|
||||
*/
|
||||
@@ -36,7 +36,7 @@ class RemoveRowBenchmark extends AbstractInsertDelete
|
||||
/**
|
||||
* @Groups({"slow"})
|
||||
* @revs(4)
|
||||
* @Iterations(11)
|
||||
* @Iterations(7)
|
||||
* @OutputTimeUnit("milliseconds")
|
||||
* @AfterMethods("tearDown")
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace PhpOffice\PhpSpreadsheetPerformance\Worksheet;
|
||||
|
||||
use PhpOffice\PhpSpreadsheetPerformance\ReferenceHelper\AbstractInsertDelete;
|
||||
|
||||
class MergeCellsBenchmark extends AbstractInsertDelete
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(256, 512);
|
||||
}
|
||||
|
||||
/**
|
||||
* @revs(5)
|
||||
* @Iterations(12)
|
||||
* @OutputTimeUnit("milliseconds")
|
||||
* @AfterMethods("tearDown")
|
||||
*/
|
||||
public function benchmarkMergeCellsByArray(): void
|
||||
{
|
||||
for ($row = 1; $row <= 512; $row += 4) {
|
||||
for ($column = 1; $column <= 256; $column += 4) {
|
||||
$this->spreadsheet->getActiveSheet()->mergeCells([$column, $row, $column + 2, $row + 2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user