From 5de7f58c9424cc57919ff223c8a506329d0640b5 Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Sun, 15 Feb 2026 16:56:44 +0300 Subject: [PATCH 1/2] Callback calls have been moved to a separate method. --- src/Benchmark.php | 46 ++++++++----------- src/Services/CallbacksService.php | 30 ++++++++++++ .../Unit/Result/ToConsoleTest/output.snap | 24 ++++++---- .../Unit/Round/RoundTest/default.snap | 24 ++++++---- .../RoundTest/round_with_data_set___0__.snap | 24 ++++++---- .../round_with_data_set___0____0_.snap | 10 ---- .../RoundTest/round_with_data_set___2__.snap | 24 ++++++---- .../round_with_data_set___2____2_.snap | 10 ---- .../RoundTest/round_with_data_set___5__.snap | 24 ++++++---- .../round_with_data_set___5____5_.snap | 10 ---- tests/Unit/Callbacks/AfterEachTest.php | 15 ++++-- tests/Unit/Callbacks/AfterTest.php | 15 ++++-- tests/Unit/Callbacks/BeforeEachTest.php | 15 ++++-- tests/Unit/Callbacks/BeforeTest.php | 15 ++++-- 14 files changed, 158 insertions(+), 128 deletions(-) delete mode 100644 tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___0____0_.snap delete mode 100644 tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___2____2_.snap delete mode 100644 tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___5____5_.snap diff --git a/src/Benchmark.php b/src/Benchmark.php index a4a7787..3acd797 100644 --- a/src/Benchmark.php +++ b/src/Benchmark.php @@ -5,7 +5,6 @@ namespace DragonCode\Benchmark; use Closure; -use DragonCode\Benchmark\Exceptions\ValueIsNotCallableException; use DragonCode\Benchmark\Services\AssertService; use DragonCode\Benchmark\Services\CallbacksService; use DragonCode\Benchmark\Services\CollectorService; @@ -16,10 +15,7 @@ use DragonCode\Benchmark\View\ProgressBarView; use function abs; -use function array_first; use function count; -use function is_array; -use function is_callable; use function max; class Benchmark @@ -102,11 +98,7 @@ public function round(?int $precision): static public function compare(array|Closure ...$callbacks): static { - $this->clear(); - - $values = $this->resolveCallbacks($callbacks); - - $this->withProgress($values, $this->steps($values)); + $this->callbacks->compare(...$callbacks); return $this; } @@ -116,6 +108,8 @@ public function compare(array|Closure ...$callbacks): static */ public function toData(): array { + $this->performCallbacks(); + return $this->result->get( $this->collector->all() ); @@ -139,13 +133,25 @@ public function toAssert(): AssertService ); } - protected function withProgress(array $callbacks, int $count): void + protected function performCallbacks(): void + { + $this->clear(); + + $callbacks = $this->callbacks->compare; + + $this->withProgress( + callback: fn (ProgressBarView $bar) => $this->chunks($callbacks, $bar), + total : $this->steps($callbacks) + ); + } + + protected function withProgress(Closure $callback, int $total): void { $this->view->emptyLine(); - $bar = $this->view->progressBar()->create($count); + $bar = $this->view->progressBar()->create($total); - $this->chunks($callbacks, $bar); + $callback($bar); $bar->finish(); $this->view->emptyLine(2); @@ -159,8 +165,6 @@ protected function steps(array $callbacks): int protected function chunks(array $callbacks, ProgressBarView $progressBar): void { foreach ($callbacks as $name => $callback) { - $this->validate($callback); - $this->callbacks->performBefore($name); $this->run($name, $callback, $progressBar); @@ -194,20 +198,6 @@ protected function push(mixed $name, float $time, float $memory): void $this->collector->push($name, [$time, $memory]); } - protected function resolveCallbacks(array $callbacks): array - { - $first = array_first($callbacks); - - return is_array($first) ? $first : $callbacks; - } - - protected function validate(mixed $callback): void - { - if (! is_callable($callback)) { - throw new ValueIsNotCallableException($callback); - } - } - protected function clear(): void { $this->result->clear(); diff --git a/src/Services/CallbacksService.php b/src/Services/CallbacksService.php index 7433eab..9cccbdf 100644 --- a/src/Services/CallbacksService.php +++ b/src/Services/CallbacksService.php @@ -5,6 +5,11 @@ namespace DragonCode\Benchmark\Services; use Closure; +use DragonCode\Benchmark\Exceptions\ValueIsNotCallableException; + +use function array_first; +use function is_array; +use function is_callable; class CallbacksService { @@ -16,6 +21,17 @@ class CallbacksService public ?Closure $afterEach = null; + public array $compare = []; + + public function compare(array|Closure ...$callbacks): void + { + foreach ($this->parameters($callbacks) as $key => $callback) { + $this->validate($callback); + + $this->compare[$key] = $callback; + } + } + public function performBefore(int|string $name): mixed { return $this->perform($this->before, $name); @@ -44,4 +60,18 @@ protected function perform(?Closure $callback, mixed ...$args): mixed return $callback(...$args); } + + protected function parameters(array $callbacks): array + { + $first = array_first($callbacks); + + return is_array($first) ? $first : $callbacks; + } + + protected function validate(mixed $callback): void + { + if (! is_callable($callback)) { + throw new ValueIsNotCallableException($callback); + } + } } diff --git a/tests/.pest/snapshots/Unit/Result/ToConsoleTest/output.snap b/tests/.pest/snapshots/Unit/Result/ToConsoleTest/output.snap index 24cb656..03fd8e9 100644 --- a/tests/.pest/snapshots/Unit/Result/ToConsoleTest/output.snap +++ b/tests/.pest/snapshots/Unit/Result/ToConsoleTest/output.snap @@ -1,10 +1,14 @@ -+-------+-------------------------------+------------------------------+ -| # | 0 | 1 | -+-------+-------------------------------+------------------------------+ -| min | 15.67890123 ms - 202 bytes | 2.3456789 ms - 102 bytes | -| max | 112.78901234 ms - 209 bytes | 9.75678901 ms - 109 bytes | -| avg | 53.02524845125 ms - 205 bytes | 5.94290024625 ms - 105 bytes | -| total | 424.20198761 ms - 1.61 KB | 47.54320197 ms - 844 bytes | -+-------+-------------------------------+------------------------------+ -| order | 2 | 1 | -+-------+-------------------------------+------------------------------+ + + 0/1 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% 1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% + + ++-------+-------------------------------+------------------------------+ +| # | 0 | 1 | ++-------+-------------------------------+------------------------------+ +| min | 15.67890123 ms - 202 bytes | 2.3456789 ms - 102 bytes | +| max | 112.78901234 ms - 209 bytes | 9.75678901 ms - 109 bytes | +| avg | 53.02524845125 ms - 205 bytes | 5.94290024625 ms - 105 bytes | +| total | 424.20198761 ms - 1.61 KB | 47.54320197 ms - 844 bytes | ++-------+-------------------------------+------------------------------+ +| order | 2 | 1 | ++-------+-------------------------------+------------------------------+ diff --git a/tests/.pest/snapshots/Unit/Round/RoundTest/default.snap b/tests/.pest/snapshots/Unit/Round/RoundTest/default.snap index 24cb656..03fd8e9 100644 --- a/tests/.pest/snapshots/Unit/Round/RoundTest/default.snap +++ b/tests/.pest/snapshots/Unit/Round/RoundTest/default.snap @@ -1,10 +1,14 @@ -+-------+-------------------------------+------------------------------+ -| # | 0 | 1 | -+-------+-------------------------------+------------------------------+ -| min | 15.67890123 ms - 202 bytes | 2.3456789 ms - 102 bytes | -| max | 112.78901234 ms - 209 bytes | 9.75678901 ms - 109 bytes | -| avg | 53.02524845125 ms - 205 bytes | 5.94290024625 ms - 105 bytes | -| total | 424.20198761 ms - 1.61 KB | 47.54320197 ms - 844 bytes | -+-------+-------------------------------+------------------------------+ -| order | 2 | 1 | -+-------+-------------------------------+------------------------------+ + + 0/1 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% 1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% + + ++-------+-------------------------------+------------------------------+ +| # | 0 | 1 | ++-------+-------------------------------+------------------------------+ +| min | 15.67890123 ms - 202 bytes | 2.3456789 ms - 102 bytes | +| max | 112.78901234 ms - 209 bytes | 9.75678901 ms - 109 bytes | +| avg | 53.02524845125 ms - 205 bytes | 5.94290024625 ms - 105 bytes | +| total | 424.20198761 ms - 1.61 KB | 47.54320197 ms - 844 bytes | ++-------+-------------------------------+------------------------------+ +| order | 2 | 1 | ++-------+-------------------------------+------------------------------+ diff --git a/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___0__.snap b/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___0__.snap index e5a0e4a..2cc2425 100644 --- a/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___0__.snap +++ b/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___0__.snap @@ -1,10 +1,14 @@ -+-------+--------------------+-------------------+ -| # | 0 | 1 | -+-------+--------------------+-------------------+ -| min | 16 ms - 202 bytes | 2 ms - 102 bytes | -| max | 113 ms - 209 bytes | 10 ms - 109 bytes | -| avg | 53 ms - 205 bytes | 6 ms - 105 bytes | -| total | 424 ms - 1.61 KB | 48 ms - 844 bytes | -+-------+--------------------+-------------------+ -| order | 2 | 1 | -+-------+--------------------+-------------------+ + + 0/1 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% 1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% + + ++-------+--------------------+-------------------+ +| # | 0 | 1 | ++-------+--------------------+-------------------+ +| min | 16 ms - 202 bytes | 2 ms - 102 bytes | +| max | 113 ms - 209 bytes | 10 ms - 109 bytes | +| avg | 53 ms - 205 bytes | 6 ms - 105 bytes | +| total | 424 ms - 1.61 KB | 48 ms - 844 bytes | ++-------+--------------------+-------------------+ +| order | 2 | 1 | ++-------+--------------------+-------------------+ diff --git a/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___0____0_.snap b/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___0____0_.snap deleted file mode 100644 index e5a0e4a..0000000 --- a/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___0____0_.snap +++ /dev/null @@ -1,10 +0,0 @@ -+-------+--------------------+-------------------+ -| # | 0 | 1 | -+-------+--------------------+-------------------+ -| min | 16 ms - 202 bytes | 2 ms - 102 bytes | -| max | 113 ms - 209 bytes | 10 ms - 109 bytes | -| avg | 53 ms - 205 bytes | 6 ms - 105 bytes | -| total | 424 ms - 1.61 KB | 48 ms - 844 bytes | -+-------+--------------------+-------------------+ -| order | 2 | 1 | -+-------+--------------------+-------------------+ diff --git a/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___2__.snap b/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___2__.snap index ca9eeba..851185b 100644 --- a/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___2__.snap +++ b/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___2__.snap @@ -1,10 +1,14 @@ -+-------+-----------------------+----------------------+ -| # | 0 | 1 | -+-------+-----------------------+----------------------+ -| min | 15.68 ms - 202 bytes | 2.35 ms - 102 bytes | -| max | 112.79 ms - 209 bytes | 9.76 ms - 109 bytes | -| avg | 53.03 ms - 205 bytes | 5.94 ms - 105 bytes | -| total | 424.2 ms - 1.61 KB | 47.54 ms - 844 bytes | -+-------+-----------------------+----------------------+ -| order | 2 | 1 | -+-------+-----------------------+----------------------+ + + 0/1 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% 1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% + + ++-------+-----------------------+----------------------+ +| # | 0 | 1 | ++-------+-----------------------+----------------------+ +| min | 15.68 ms - 202 bytes | 2.35 ms - 102 bytes | +| max | 112.79 ms - 209 bytes | 9.76 ms - 109 bytes | +| avg | 53.03 ms - 205 bytes | 5.94 ms - 105 bytes | +| total | 424.2 ms - 1.61 KB | 47.54 ms - 844 bytes | ++-------+-----------------------+----------------------+ +| order | 2 | 1 | ++-------+-----------------------+----------------------+ diff --git a/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___2____2_.snap b/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___2____2_.snap deleted file mode 100644 index ca9eeba..0000000 --- a/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___2____2_.snap +++ /dev/null @@ -1,10 +0,0 @@ -+-------+-----------------------+----------------------+ -| # | 0 | 1 | -+-------+-----------------------+----------------------+ -| min | 15.68 ms - 202 bytes | 2.35 ms - 102 bytes | -| max | 112.79 ms - 209 bytes | 9.76 ms - 109 bytes | -| avg | 53.03 ms - 205 bytes | 5.94 ms - 105 bytes | -| total | 424.2 ms - 1.61 KB | 47.54 ms - 844 bytes | -+-------+-----------------------+----------------------+ -| order | 2 | 1 | -+-------+-----------------------+----------------------+ diff --git a/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___5__.snap b/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___5__.snap index 637cc7d..b539f60 100644 --- a/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___5__.snap +++ b/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___5__.snap @@ -1,10 +1,14 @@ -+-------+--------------------------+------------------------+ -| # | 0 | 1 | -+-------+--------------------------+------------------------+ -| min | 15.6789 ms - 202 bytes | 2.34568 ms - 102 bytes | -| max | 112.78901 ms - 209 bytes | 9.75679 ms - 109 bytes | -| avg | 53.02525 ms - 205 bytes | 5.9429 ms - 105 bytes | -| total | 424.20199 ms - 1.61 KB | 47.5432 ms - 844 bytes | -+-------+--------------------------+------------------------+ -| order | 2 | 1 | -+-------+--------------------------+------------------------+ + + 0/1 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% 1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% + + ++-------+--------------------------+------------------------+ +| # | 0 | 1 | ++-------+--------------------------+------------------------+ +| min | 15.6789 ms - 202 bytes | 2.34568 ms - 102 bytes | +| max | 112.78901 ms - 209 bytes | 9.75679 ms - 109 bytes | +| avg | 53.02525 ms - 205 bytes | 5.9429 ms - 105 bytes | +| total | 424.20199 ms - 1.61 KB | 47.5432 ms - 844 bytes | ++-------+--------------------------+------------------------+ +| order | 2 | 1 | ++-------+--------------------------+------------------------+ diff --git a/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___5____5_.snap b/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___5____5_.snap deleted file mode 100644 index 637cc7d..0000000 --- a/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___5____5_.snap +++ /dev/null @@ -1,10 +0,0 @@ -+-------+--------------------------+------------------------+ -| # | 0 | 1 | -+-------+--------------------------+------------------------+ -| min | 15.6789 ms - 202 bytes | 2.34568 ms - 102 bytes | -| max | 112.78901 ms - 209 bytes | 9.75679 ms - 109 bytes | -| avg | 53.02525 ms - 205 bytes | 5.9429 ms - 105 bytes | -| total | 424.20199 ms - 1.61 KB | 47.5432 ms - 844 bytes | -+-------+--------------------------+------------------------+ -| order | 2 | 1 | -+-------+--------------------------+------------------------+ diff --git a/tests/Unit/Callbacks/AfterEachTest.php b/tests/Unit/Callbacks/AfterEachTest.php index 61265d3..6ae7600 100644 --- a/tests/Unit/Callbacks/AfterEachTest.php +++ b/tests/Unit/Callbacks/AfterEachTest.php @@ -14,7 +14,8 @@ ->compare([ fn () => true, fn () => true, - ]); + ]) + ->toData(); expect($result)->toHaveCount(6); }); @@ -29,7 +30,8 @@ ->compare([ 'foo' => fn () => true, 'bar' => fn () => true, - ]); + ]) + ->toData(); expect($result)->toBe([ 'foo', @@ -51,7 +53,8 @@ ->compare([ 'foo' => fn () => true, 'bar' => fn () => true, - ]); + ]) + ->toData(); expect($result)->toBe([ 'foo:1', @@ -73,7 +76,8 @@ ->compare([ fn () => true, fn () => true, - ]); + ]) + ->toData(); expect($result)->toBe([ '0:1', @@ -95,7 +99,8 @@ ->compare( fn () => true, fn () => true, - ); + ) + ->toData(); expect($result)->toBe([ '0:1', diff --git a/tests/Unit/Callbacks/AfterTest.php b/tests/Unit/Callbacks/AfterTest.php index 216fa6f..7a07d6e 100644 --- a/tests/Unit/Callbacks/AfterTest.php +++ b/tests/Unit/Callbacks/AfterTest.php @@ -14,7 +14,8 @@ ->compare([ fn () => true, fn () => true, - ]); + ]) + ->toData(); expect($result)->toHaveCount(2); }); @@ -29,7 +30,8 @@ ->compare([ 'foo' => fn () => true, 'bar' => fn () => true, - ]); + ]) + ->toData(); expect($result)->toBe([ 'foo', @@ -47,7 +49,8 @@ ->compare([ fn () => true, fn () => true, - ]); + ]) + ->toData(); expect($result)->toBe([ 0, @@ -65,7 +68,8 @@ ->compare( foo: fn () => true, bar: fn () => true, - ); + ) + ->toData(); expect($result)->toBe([ 'foo', @@ -83,7 +87,8 @@ ->compare( fn () => true, fn () => true, - ); + ) + ->toData(); expect($result)->toBe([ 0, diff --git a/tests/Unit/Callbacks/BeforeEachTest.php b/tests/Unit/Callbacks/BeforeEachTest.php index 9e366d4..a7d5899 100644 --- a/tests/Unit/Callbacks/BeforeEachTest.php +++ b/tests/Unit/Callbacks/BeforeEachTest.php @@ -14,7 +14,8 @@ ->compare([ fn () => true, fn () => true, - ]); + ]) + ->toData(); expect($result)->toHaveCount(6); }); @@ -29,7 +30,8 @@ ->compare([ 'foo' => fn () => true, 'bar' => fn () => true, - ]); + ]) + ->toData(); expect($result)->toBe([ 'foo', @@ -51,7 +53,8 @@ ->compare([ 'foo' => fn () => true, 'bar' => fn () => true, - ]); + ]) + ->toData(); expect($result)->toBe([ 'foo:1', @@ -73,7 +76,8 @@ ->compare([ fn () => true, fn () => true, - ]); + ]) + ->toData(); expect($result)->toBe([ '0:1', @@ -95,7 +99,8 @@ ->compare( fn () => true, fn () => true, - ); + ) + ->toData(); expect($result)->toBe([ '0:1', diff --git a/tests/Unit/Callbacks/BeforeTest.php b/tests/Unit/Callbacks/BeforeTest.php index c126e42..927f56c 100644 --- a/tests/Unit/Callbacks/BeforeTest.php +++ b/tests/Unit/Callbacks/BeforeTest.php @@ -14,7 +14,8 @@ ->compare([ fn () => true, fn () => true, - ]); + ]) + ->toData(); expect($result)->toHaveCount(2); }); @@ -29,7 +30,8 @@ ->compare([ 'foo' => fn () => true, 'bar' => fn () => true, - ]); + ]) + ->toData(); expect($result)->toBe([ 'foo', @@ -47,7 +49,8 @@ ->compare([ fn () => true, fn () => true, - ]); + ]) + ->toData(); expect($result)->toBe([ 0, @@ -65,7 +68,8 @@ ->compare( foo: fn () => true, bar: fn () => true, - ); + ) + ->toData(); expect($result)->toBe([ 'foo', @@ -83,7 +87,8 @@ ->compare( fn () => true, fn () => true, - ); + ) + ->toData(); expect($result)->toBe([ 0, From d8f2e98c891dce309a508c0ef5bdd20949d57feb Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Sun, 15 Feb 2026 16:57:57 +0300 Subject: [PATCH 2/2] Added new snapshot files for RoundTest in old Pest tests. --- .../RoundTest/round_with_data_set___0____0_.snap | 14 ++++++++++++++ .../RoundTest/round_with_data_set___2____2_.snap | 14 ++++++++++++++ .../RoundTest/round_with_data_set___5____5_.snap | 14 ++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___0____0_.snap create mode 100644 tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___2____2_.snap create mode 100644 tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___5____5_.snap diff --git a/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___0____0_.snap b/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___0____0_.snap new file mode 100644 index 0000000..2cc2425 --- /dev/null +++ b/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___0____0_.snap @@ -0,0 +1,14 @@ + + 0/1 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% 1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% + + ++-------+--------------------+-------------------+ +| # | 0 | 1 | ++-------+--------------------+-------------------+ +| min | 16 ms - 202 bytes | 2 ms - 102 bytes | +| max | 113 ms - 209 bytes | 10 ms - 109 bytes | +| avg | 53 ms - 205 bytes | 6 ms - 105 bytes | +| total | 424 ms - 1.61 KB | 48 ms - 844 bytes | ++-------+--------------------+-------------------+ +| order | 2 | 1 | ++-------+--------------------+-------------------+ diff --git a/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___2____2_.snap b/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___2____2_.snap new file mode 100644 index 0000000..851185b --- /dev/null +++ b/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___2____2_.snap @@ -0,0 +1,14 @@ + + 0/1 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% 1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% + + ++-------+-----------------------+----------------------+ +| # | 0 | 1 | ++-------+-----------------------+----------------------+ +| min | 15.68 ms - 202 bytes | 2.35 ms - 102 bytes | +| max | 112.79 ms - 209 bytes | 9.76 ms - 109 bytes | +| avg | 53.03 ms - 205 bytes | 5.94 ms - 105 bytes | +| total | 424.2 ms - 1.61 KB | 47.54 ms - 844 bytes | ++-------+-----------------------+----------------------+ +| order | 2 | 1 | ++-------+-----------------------+----------------------+ diff --git a/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___5____5_.snap b/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___5____5_.snap new file mode 100644 index 0000000..b539f60 --- /dev/null +++ b/tests/.pest/snapshots/Unit/Round/RoundTest/round_with_data_set___5____5_.snap @@ -0,0 +1,14 @@ + + 0/1 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% 1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% + + ++-------+--------------------------+------------------------+ +| # | 0 | 1 | ++-------+--------------------------+------------------------+ +| min | 15.6789 ms - 202 bytes | 2.34568 ms - 102 bytes | +| max | 112.78901 ms - 209 bytes | 9.75679 ms - 109 bytes | +| avg | 53.02525 ms - 205 bytes | 5.9429 ms - 105 bytes | +| total | 424.20199 ms - 1.61 KB | 47.5432 ms - 844 bytes | ++-------+--------------------------+------------------------+ +| order | 2 | 1 | ++-------+--------------------------+------------------------+