File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,14 @@ public static IHostBuilder CreateHostBuilder(string[] args)
110110 if ( Enum . TryParse < LogLevel > ( config [ "LogLevel" ] , out var logLevel ) && logLevel != LogLevel . None )
111111 {
112112 Console . WriteLine ( $ "Console Logging enabled with level '{ logLevel } '") ;
113- loggerFactory . AddConsole ( o => o . TimestampFormat = "ss.ffff " ) . SetMinimumLevel ( logLevel ) ;
113+
114+ loggerFactory
115+ #if NETCOREAPP3_1
116+ . AddConsole ( o => o . TimestampFormat = "ss.ffff " )
117+ #else
118+ . AddSimpleConsole ( o => o . TimestampFormat = "ss.ffff " )
119+ #endif
120+ . SetMinimumLevel ( logLevel ) ;
114121 }
115122 } )
116123 . UseDefaultServiceProvider ( ( context , options ) =>
Original file line number Diff line number Diff line change @@ -48,8 +48,8 @@ class Program
4848 private static List < List < double > > _latencyPerConnection = null ! ;
4949 private static double _maxLatency ;
5050 private static Stopwatch _workTimer = new Stopwatch ( ) ;
51- private static bool _warmingUp ;
52- private static bool _stopped ;
51+ private static volatile bool _warmingUp ;
52+ private static volatile bool _stopped ;
5353 private static SemaphoreSlim _lock = new SemaphoreSlim ( 1 ) ;
5454 private static List < ( double sum , int count ) > _latencyAverage = null ! ;
5555 private static int _totalRequests ;
@@ -112,6 +112,7 @@ private static async Task StartScenario()
112112 var cts = new CancellationTokenSource ( ) ;
113113 cts . CancelAfter ( TimeSpan . FromSeconds ( _options . Duration + _options . Warmup ) ) ;
114114
115+ _warmingUp = true ;
115116 _ = Task . Run ( async ( ) =>
116117 {
117118 await Task . Delay ( TimeSpan . FromSeconds ( _options . Warmup ) ) ;
You can’t perform that action at this time.
0 commit comments