Skip to content

Commit 48ae26c

Browse files
committed
Switch to fqn symfony branch
1 parent 4a1bce1 commit 48ae26c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

benchmark/benchmark.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function runBench(bool $jit): array {
6262

6363
function runSymfonyDemo(bool $jit): array {
6464
$dir = __DIR__ . '/repos/symfony-demo-2.2.3';
65-
cloneRepo($dir, 'https://github.com/php/benchmarking-symfony-demo-2.2.3.git');
65+
cloneRepo($dir, 'https://github.com/php/benchmarking-symfony-demo-2.2.3.git', branch: 'fqn-functions');
6666
runPhpCommand([$dir . '/bin/console', 'cache:clear']);
6767
runPhpCommand([$dir . '/bin/console', 'cache:warmup']);
6868
return runValgrindPhpCgiCommand('symfony-demo', [$dir . '/public/index.php'], cwd: $dir, jit: $jit, warmup: 50, repeat: 50);

benchmark/shared.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function runCommand(array $args, ?string $cwd = null): ProcessResult {
5959
return $result;
6060
}
6161

62-
function cloneRepo(string $path, string $url) {
62+
function cloneRepo(string $path, string $url, ?string $branch = null) {
6363
if (is_dir($path)) {
6464
return;
6565
}
@@ -68,5 +68,6 @@ function cloneRepo(string $path, string $url) {
6868
if (!is_dir($dir)) {
6969
mkdir($dir, 0755, true);
7070
}
71-
runCommand(['git', 'clone', '-q', '--end-of-options', $url, $repo], dirname($path));
71+
$branchFlags = $branch ? ['-b', $branch] : [];
72+
runCommand(['git', 'clone', '-q', ...$branchFlags, '--end-of-options', $url, $repo], dirname($path));
7273
}

0 commit comments

Comments
 (0)