Skip to content

Commit 6b9f791

Browse files
committed
Testing
1 parent 637bcd9 commit 6b9f791

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

benchmark/benchmark.php

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

6767
function runSymfonyDemo(bool $jit): array {
6868
$dir = __DIR__ . '/repos/symfony-demo-2.2.3';
69-
cloneRepo($dir, 'https://github.com/php/benchmarking-symfony-demo-2.2.3.git');
69+
cloneRepo($dir, 'https://github.com/php/benchmarking-symfony-demo-2.2.3.git', 'un-static-closures');
7070
runPhpCommand([$dir . '/bin/console', 'cache:clear']);
7171
runPhpCommand([$dir . '/bin/console', 'cache:warmup']);
7272
return runValgrindPhpCgiCommand('symfony-demo', [$dir . '/public/index.php'], cwd: $dir, jit: $jit, warmup: 50, repeat: 50);

benchmark/shared.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,22 @@ function runCommand(array $args, ?string $cwd = null, bool $printCommand = true)
6161
return $result;
6262
}
6363

64-
function cloneRepo(string $path, string $url) {
64+
function cloneRepo(string $path, string $url, ?string $branch = null) {
6565
if (is_dir($path)) {
6666
return;
6767
}
6868
$dir = dirname($path);
6969
$repo = basename($path);
7070
if (!is_dir($dir)) {
7171
mkdir($dir, 0755, true);
72+
73+
}
74+
75+
$args = ['git', 'clone', '-q', ];
76+
if ($branch) {
77+
$args = array_merge($args, ['-b', $branch]);
7278
}
73-
runCommand(['git', 'clone', '-q', '--end-of-options', $url, $repo], dirname($path));
79+
$args = array_merge($args, ['--end-of-options', $url, $repo]);
80+
81+
runCommand($args, dirname($path));
7482
}

0 commit comments

Comments
 (0)