@@ -80,23 +80,22 @@ private ExecuteResult Execute(BenchmarkCase benchmarkCase,
8080 using ( ConsoleExitHandler consoleExitHandler = new ( process , logger ) )
8181 using ( AsyncProcessOutputReader processOutputReader = new ( process , logOutput : true , logger , readStandardError : false ) )
8282 {
83- var loggerWithDiagnoser = new Broker ( logger , process , diagnoser , benchmarkCase , benchmarkId , inputFromBenchmark , acknowledgments ) ;
83+ Broker broker = new ( logger , process , diagnoser , benchmarkCase , benchmarkId , inputFromBenchmark , acknowledgments ) ;
8484
8585 logger . WriteLineInfo ( $ "// Execute: { process . StartInfo . FileName } { process . StartInfo . Arguments } in { process . StartInfo . WorkingDirectory } ") ;
8686
8787 diagnoser ? . Handle ( HostSignal . BeforeProcessStart , new DiagnoserActionParameters ( process , benchmarkCase , benchmarkId ) ) ;
8888
8989 process . Start ( ) ;
90+ processOutputReader . BeginRead ( ) ;
9091
9192 process . EnsureHighPriority ( logger ) ;
9293 if ( benchmarkCase . Job . Environment . HasValue ( EnvironmentMode . AffinityCharacteristic ) )
9394 {
9495 process . TrySetAffinity ( benchmarkCase . Job . Environment . Affinity , logger ) ;
9596 }
9697
97- processOutputReader . BeginRead ( ) ;
98-
99- loggerWithDiagnoser . ProcessData ( ) ;
98+ broker . ProcessData ( ) ;
10099
101100 if ( ! process . WaitForExit ( milliseconds : ( int ) ExecuteParameters . ProcessExitTimeout . TotalMilliseconds ) )
102101 {
@@ -113,8 +112,8 @@ private ExecuteResult Execute(BenchmarkCase benchmarkCase,
113112 return new ExecuteResult ( true ,
114113 process . HasExited ? process . ExitCode : null ,
115114 process . Id ,
116- loggerWithDiagnoser . Results ,
117- loggerWithDiagnoser . PrefixedOutput ,
115+ broker . Results ,
116+ broker . PrefixedOutput ,
118117 processOutputReader . GetOutputLines ( ) ,
119118 launchIndex ) ;
120119 }
0 commit comments