-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reorganises the benchmark structure, allowing us to have better visibility and more easily filter on groups/variants. Signed-off-by: Luís Cobucci <[email protected]>
- Loading branch information
Showing
7 changed files
with
279 additions
and
277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace FastRoute\Benchmark; | ||
|
||
use FastRoute\Dispatcher; | ||
use PhpBench\Attributes as Bench; | ||
|
||
#[Bench\Iterations(5)] | ||
#[Bench\Revs(100)] | ||
#[Bench\Warmup(3)] | ||
final class RouteRegistrationBench | ||
{ | ||
#[Bench\Subject] | ||
#[Bench\Groups(['group_count'])] | ||
public function groupCount(): void | ||
{ | ||
DispatcherForBenchmark::realLifeExample(Dispatcher\GroupCountBased::class); | ||
} | ||
|
||
#[Bench\Subject] | ||
#[Bench\Groups(['char_count'])] | ||
public function charCount(): void | ||
{ | ||
DispatcherForBenchmark::realLifeExample(Dispatcher\CharCountBased::class); | ||
} | ||
|
||
#[Bench\Subject] | ||
#[Bench\Groups(['group_pos'])] | ||
public function groupPos(): void | ||
{ | ||
DispatcherForBenchmark::realLifeExample(Dispatcher\GroupPosBased::class); | ||
} | ||
|
||
#[Bench\Subject] | ||
#[Bench\Groups(['mark'])] | ||
public function mark(): void | ||
{ | ||
DispatcherForBenchmark::realLifeExample(Dispatcher\MarkBased::class); | ||
} | ||
} |
Oops, something went wrong.