Skip to content

Commit 60c48c7

Browse files
committed
Add file sorting to benchmarks
1 parent a284b33 commit 60c48c7

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

tests/Benchmark/CompileBench.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,20 +97,35 @@ public static function parameterProvider(): iterable
9797
yield 'no compactors' => [
9898
self::WITHOUT_COMPACTORS_DIR,
9999
false,
100+
false,
100101
];
101102

102103
yield 'with compactors; no parallel processing' => [
103104
self::WITH_COMPACTORS_DIR,
104105
false,
106+
false,
105107
];
106108

107109
yield 'with compactors; parallel processing' => [
108110
self::WITH_COMPACTORS_DIR,
109111
true,
112+
false,
110113
];
114+
115+
yield 'with compactors; no parallel processing; sort compiled files' => [
116+
self::WITH_COMPACTORS_DIR,
117+
false,
118+
true,
119+
],
120+
121+
yield 'with compactors; parallel processing; sort compiled files' => [
122+
self::WITH_COMPACTORS_DIR,
123+
true,
124+
true,
125+
],
111126
}
112127

113-
private static function createIO(bool $enableParallelization): IO
128+
private static function createIO(bool $enableParallelization, bool $sortCompiledFiles): IO
114129
{
115130
$input = [
116131
'compile',
@@ -121,6 +136,10 @@ private static function createIO(bool $enableParallelization): IO
121136
$input['--no-parallel'] = null;
122137
}
123138

139+
if ($sortCompiledFiles) {
140+
$input['--sort-compiled-files'] = null;
141+
}
142+
124143
return new IO(
125144
new ArrayInput($input),
126145
new NullOutput(),

0 commit comments

Comments
 (0)