mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Add Laravel demo page to benchmark CI
The demo page doesn't do a lot, but might still be useful. 100 runs is enough to get rid of any prominent compilation overhead in the profiles. Closes GH-12466.
This commit is contained in:
parent
25f42bc9ce
commit
1c9c3af157
1 changed files with 13 additions and 0 deletions
|
@ -27,6 +27,8 @@ function main() {
|
|||
$data['Symfony Demo 2.2.3 JIT'] = runSymfonyDemo(true);
|
||||
$data['Wordpress 6.2'] = runWordpress(false);
|
||||
$data['Wordpress 6.2 JIT'] = runWordpress(true);
|
||||
$data['Laravel 10.10'] = runLaravelDemo(false);
|
||||
$data['Laravel 10.10 JIT'] = runLaravelDemo(true);
|
||||
$result = json_encode($data, JSON_PRETTY_PRINT) . "\n";
|
||||
|
||||
fwrite(STDOUT, $result);
|
||||
|
@ -89,6 +91,17 @@ function runWordpress(bool $jit): array {
|
|||
return runValgrindPhpCgiCommand('wordpress', [$dir . '/index.php'], cwd: $dir, jit: $jit, warmup: 50, repeat: 50);
|
||||
}
|
||||
|
||||
function runLaravelDemo(bool $jit): array {
|
||||
|
||||
$dir = __DIR__ . '/repos/laravel-demo-10.10';
|
||||
cloneRepo($dir, 'https://github.com/php/benchmarking-laravel-demo-10.10.git');
|
||||
runPhpCommand([$dir . '/artisan', 'config:cache']);
|
||||
runPhpCommand([$dir . '/artisan', 'event:cache']);
|
||||
runPhpCommand([$dir . '/artisan', 'route:cache']);
|
||||
runPhpCommand([$dir . '/artisan', 'view:cache']);
|
||||
return runValgrindPhpCgiCommand('laravel-demo', [$dir . '/public/index.php'], cwd: $dir, jit: $jit, warmup: 50, repeat: 100);
|
||||
}
|
||||
|
||||
function runPhpCommand(array $args, ?string $cwd = null): ProcessResult {
|
||||
return runCommand([PHP_BINARY, ...$args], $cwd);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue