@@ -45,31 +45,24 @@ public class PerformanceMetrics {
4545 */
4646 public PerformanceMetric bwapiResponse ;
4747
48- /**
49- * Whether performance timers have been enabled in the JBWAPI configuration.
50- * Timers are off by default to spare performance.
51- */
52- public final boolean timersEnabled ;
53-
5448 /**
5549 * Time bot spends idle.
5650 * Applicable only in asynchronous mode.
5751 */
5852 public PerformanceMetric botIdle ;
5953
6054 public PerformanceMetrics (BWClientConfiguration configuration ) {
61- timersEnabled = configuration .collectPerformanceMetrics ;
6255 final int frameDurationBufferMs = 5 ;
6356 final int sideEffectsBufferMs = 1 ;
6457 final int realTimeFrameMs = 42 ;
65- totalFrameDuration = new PerformanceMetric ("Total frame duration" , configuration .asyncFrameDurationMs + frameDurationBufferMs , timersEnabled );
66- copyingToBuffer = new PerformanceMetric ("Time copying to buffer" , 5 , timersEnabled );
67- intentionallyBlocking = new PerformanceMetric ("Intentionally blocking" , 0 , timersEnabled );
68- frameBufferSize = new PerformanceMetric ("Frames buffered" , 0 , timersEnabled );
69- flushSideEffects = new PerformanceMetric ("Flush side effects" , sideEffectsBufferMs , timersEnabled );
70- botResponse = new PerformanceMetric ("Bot Responses" , configuration .asyncFrameDurationMs , timersEnabled );
71- bwapiResponse = new PerformanceMetric ("BWAPI Responses" , realTimeFrameMs , timersEnabled );
72- botIdle = new PerformanceMetric ("Bot idle" , Long .MAX_VALUE , timersEnabled );
58+ totalFrameDuration = new PerformanceMetric ("Total frame duration" , configuration .asyncFrameDurationMs + frameDurationBufferMs );
59+ copyingToBuffer = new PerformanceMetric ("Time copying to buffer" , 5 );
60+ intentionallyBlocking = new PerformanceMetric ("Intentionally blocking" , 0 );
61+ frameBufferSize = new PerformanceMetric ("Frames buffered" , 0 );
62+ flushSideEffects = new PerformanceMetric ("Flush side effects" , sideEffectsBufferMs );
63+ botResponse = new PerformanceMetric ("Bot Responses" , configuration .asyncFrameDurationMs );
64+ bwapiResponse = new PerformanceMetric ("BWAPI Responses" , realTimeFrameMs );
65+ botIdle = new PerformanceMetric ("Bot idle" , Long .MAX_VALUE );
7366 }
7467
7568 @ Override
0 commit comments