@@ -34,7 +34,7 @@ class BenchmarkProcessResult {
3434 true => arguments
3535 .where ((arg) => arg != '--define=isBenchmarkProcess=true' )
3636 .join (' ' ),
37- false => arguments.join (' ' )
37+ false => arguments.join (' ' ),
3838 };
3939 return executable +
4040 (args.isEmpty
@@ -64,14 +64,16 @@ extension BenchmarkProcess on Process {
6464 Encoding ? stdoutEncoding = const Utf8Codec (), // Enables histogram output
6565 Encoding ? stderrEncoding = const Utf8Codec (), // on windows.
6666 }) {
67- return Process .run (executable, [...arguments, benchmarkFile.path],
68- workingDirectory: workingDirectory,
69- environment: environment,
70- includeParentEnvironment: includeParentEnvironment,
71- runInShell: runInShell,
72- stdoutEncoding: stdoutEncoding,
73- stderrEncoding: stderrEncoding)
74- .then <BenchmarkProcessResult >((processResult) {
67+ return Process .run (
68+ executable,
69+ [...arguments, benchmarkFile.path],
70+ workingDirectory: workingDirectory,
71+ environment: environment,
72+ includeParentEnvironment: includeParentEnvironment,
73+ runInShell: runInShell,
74+ stdoutEncoding: stdoutEncoding,
75+ stderrEncoding: stderrEncoding,
76+ ).then <BenchmarkProcessResult >((processResult) {
7577 return BenchmarkProcessResult (
7678 executable: executable,
7779 arguments: arguments,
@@ -128,60 +130,66 @@ extension BenchmarkUtils on BenchmarkProcessResult {
128130 final out = StringBuffer ();
129131
130132 out.writeln ('------- Summary -------- ' .style (ColorProfile .dim));
131- out.writeln ('Total run time: ${duration .ssms .style (
132- ColorProfile .success ,
133- )}' );
133+ out.writeln ('Total run time: ${duration .ssms .style (ColorProfile .success )}' );
134134
135135 for (final result in results) {
136136 numberOfFailedBenchmarks += result.numberOfFailedBenchmarks;
137137 numberOfFailedGroups += result.numberOfFailedGroups;
138138 numberOfCompletedBenchmarks += result.numberOfCompletedBenchmarks;
139139 }
140140
141- out.writeln ('Completed benchmarks: '
142- '${ numberOfCompletedBenchmarks . toString (). style (
143- ColorProfile .success ,
144- )}.' );
141+ out.writeln (
142+ 'Completed benchmarks: '
143+ '${ numberOfCompletedBenchmarks . toString (). style ( ColorProfile .success )}.' ,
144+ );
145145
146146 if (numberOfFailedBenchmarks > 0 ) {
147- out.writeln ('Benchmarks with errors: '
148- '${numberOfFailedBenchmarks .toString ().style (ColorProfile .error )}.' );
147+ out.writeln (
148+ 'Benchmarks with errors: '
149+ '${numberOfFailedBenchmarks .toString ().style (ColorProfile .error )}.' ,
150+ );
149151 exitCode = ExitCode .someBenchmarksFailed;
150152 }
151153
152154 if (numberOfFailedGroups > 0 ) {
153- out.writeln ('Groups with errors: '
154- '${numberOfFailedGroups .toString ().style (ColorProfile .error )}.\n '
155- 'Some benchmarks may have been skipped!' );
155+ out.writeln (
156+ 'Groups with errors: '
157+ '${numberOfFailedGroups .toString ().style (ColorProfile .error )}.\n '
158+ 'Some benchmarks may have been skipped!' ,
159+ );
156160 exitCode = ExitCode .someGroupsFailed;
157161 }
158162
159163 if ((numberOfFailedBenchmarks > 0 || numberOfFailedGroups > 0 ) &&
160164 ! isVerbose) {
161- out.writeln ('Try using the option '
162- '${'--verbose' .style (ColorProfile .emphasize + Ansi .yellow )} or '
163- '${'-v' .style (ColorProfile .emphasize + Ansi .yellow )} '
164- 'for more details.' );
165+ out.writeln (
166+ 'Try using the option '
167+ '${'--verbose' .style (ColorProfile .emphasize + Ansi .yellow )} or '
168+ '${'-v' .style (ColorProfile .emphasize + Ansi .yellow )} '
169+ 'for more details.' ,
170+ );
165171 }
166172
167173 switch (exitCode) {
168174 case ExitCode .someBenchmarksFailed:
169- out.writeln ('Exiting with code '
170- '${ ExitCode . someBenchmarksFailed . code }: '
171- '${ExitCode .someBenchmarksFailed .description . style (
172- ColorProfile .error ,
173- )}' ) ;
175+ out.writeln (
176+ 'Exiting with code '
177+ '${ExitCode .someBenchmarksFailed .code }: '
178+ '${ ExitCode . someBenchmarksFailed . description . style ( ColorProfile .error )}' ,
179+ );
174180 break ;
175181 case ExitCode .allBenchmarksExecuted:
176- out.writeln ('${'Completed successfully.' .style (ColorProfile .success )}\n '
177- 'Exiting with code: 0.' );
182+ out.writeln (
183+ '${'Completed successfully.' .style (ColorProfile .success )}\n '
184+ 'Exiting with code: 0.' ,
185+ );
178186 break ;
179187 case ExitCode .someGroupsFailed:
180- out.writeln ('Exiting with code '
181- '${ ExitCode . someGroupsFailed . code }: '
182- '${ExitCode .someGroupsFailed .description . style (
183- ColorProfile .error ,
184- )}' ) ;
188+ out.writeln (
189+ 'Exiting with code '
190+ '${ExitCode .someGroupsFailed .code }: '
191+ '${ ExitCode . someGroupsFailed . description . style ( ColorProfile .error )}' ,
192+ );
185193 break ;
186194 default :
187195 }
0 commit comments