Skip to content

Commit 2032438

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: [skip ci] Fix valgrind benchmark diff output
2 parents 3a5c87f + c0b441f commit 2032438

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Diff for: benchmark/generate_diff.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ function find_benchmarked_commit_hash(string $repo, string $commitHash): ?string
7373
if (file_exists($summaryFile)) {
7474
break;
7575
}
76-
$commitHash = trim(runCommand(['git', 'rev-parse', $commitHash . '^'], dirname(__DIR__))->stdout);
76+
$commitHash = trim(runCommand(
77+
['git', 'rev-parse', $commitHash . '^'],
78+
dirname(__DIR__),
79+
printCommand: false,
80+
)->stdout);
7781
}
7882

7983
return $commitHash;

Diff for: benchmark/shared.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ class ProcessResult {
55
public $stderr;
66
}
77

8-
function runCommand(array $args, ?string $cwd = null): ProcessResult {
8+
function runCommand(array $args, ?string $cwd = null, bool $printCommand = true): ProcessResult {
99
$cmd = implode(' ', array_map('escapeshellarg', $args));
1010
$pipes = null;
1111
$result = new ProcessResult();
1212
$descriptorSpec = [0 => ['pipe', 'r'], 1 => ['pipe', 'w'], 2 => ['pipe', 'w']];
13-
fwrite(STDOUT, "> $cmd\n");
13+
if ($printCommand) {
14+
fwrite(STDOUT, "> $cmd\n");
15+
}
1416
$processHandle = proc_open($cmd, $descriptorSpec, $pipes, $cwd ?? getcwd(), null);
1517

1618
$stdin = $pipes[0];

0 commit comments

Comments
 (0)