@@ -35,6 +35,8 @@ class PerformanceLogger implements IPerformanceLogger {
3535 endExtras ? : Extras ,
3636 ) {
3737 if ( this . _closed ) {
38+ /* $FlowFixMe[constant-condition] Error discovered during Constant
39+ * Condition roll out. See https://fburl.com/workplace/1v97vimq. */
3840 if ( PRINT_TO_CONSOLE && __DEV__ ) {
3941 console . log (
4042 'PerformanceLogger: addTimespan - has closed ignoring: ' ,
@@ -44,6 +46,8 @@ class PerformanceLogger implements IPerformanceLogger {
4446 return ;
4547 }
4648 if ( this . _timespans [ key ] ) {
49+ /* $FlowFixMe[constant-condition] Error discovered during Constant
50+ * Condition roll out. See https://fburl.com/workplace/1v97vimq. */
4751 if ( PRINT_TO_CONSOLE && __DEV__ ) {
4852 console . log (
4953 'PerformanceLogger: Attempting to add a timespan that already exists ' ,
@@ -79,6 +83,8 @@ class PerformanceLogger implements IPerformanceLogger {
7983 this . _timespans = { } ;
8084 this . _extras = { } ;
8185 this . _points = { } ;
86+ /* $FlowFixMe[constant-condition] Error discovered during Constant
87+ * Condition roll out. See https://fburl.com/workplace/1v97vimq. */
8288 if ( PRINT_TO_CONSOLE ) {
8389 console . log ( 'PerformanceLogger.js' , 'clear' ) ;
8490 }
@@ -92,6 +98,8 @@ class PerformanceLogger implements IPerformanceLogger {
9298 }
9399 this . _extras = { } ;
94100 this . _points = { } ;
101+ /* $FlowFixMe[constant-condition] Error discovered during Constant
102+ * Condition roll out. See https://fburl.com/workplace/1v97vimq. */
95103 if ( PRINT_TO_CONSOLE ) {
96104 console . log ( 'PerformanceLogger.js' , 'clearCompleted' ) ;
97105 }
@@ -130,6 +138,8 @@ class PerformanceLogger implements IPerformanceLogger {
130138 }
131139
132140 logEverything ( ) {
141+ /* $FlowFixMe[constant-condition] Error discovered during Constant
142+ * Condition roll out. See https://fburl.com/workplace/1v97vimq. */
133143 if ( PRINT_TO_CONSOLE ) {
134144 // log timespans
135145 for ( const key in this . _timespans ) {
@@ -156,6 +166,8 @@ class PerformanceLogger implements IPerformanceLogger {
156166 extras ? : Extras ,
157167 ) {
158168 if ( this . _closed ) {
169+ /* $FlowFixMe[constant-condition] Error discovered during Constant
170+ * Condition roll out. See https://fburl.com/workplace/1v97vimq. */
159171 if ( PRINT_TO_CONSOLE && __DEV__ ) {
160172 console . log (
161173 'PerformanceLogger: markPoint - has closed ignoring: ' ,
@@ -165,6 +177,8 @@ class PerformanceLogger implements IPerformanceLogger {
165177 return ;
166178 }
167179 if ( this . _points [ key ] != null ) {
180+ /* $FlowFixMe[constant-condition] Error discovered during Constant
181+ * Condition roll out. See https://fburl.com/workplace/1v97vimq. */
168182 if ( PRINT_TO_CONSOLE && __DEV__ ) {
169183 console . log (
170184 'PerformanceLogger: Attempting to mark a point that has been already logged ' ,
@@ -187,13 +201,17 @@ class PerformanceLogger implements IPerformanceLogger {
187201
188202 setExtra ( key : string , value : ExtraValue ) {
189203 if ( this . _closed ) {
204+ /* $FlowFixMe[constant-condition] Error discovered during Constant
205+ * Condition roll out. See https://fburl.com/workplace/1v97vimq. */
190206 if ( PRINT_TO_CONSOLE && __DEV__ ) {
191207 console . log ( 'PerformanceLogger: setExtra - has closed ignoring: ' , key ) ;
192208 }
193209 return ;
194210 }
195211
196212 if ( this . _extras . hasOwnProperty ( key ) ) {
213+ /* $FlowFixMe[constant-condition] Error discovered during Constant
214+ * Condition roll out. See https://fburl.com/workplace/1v97vimq. */
197215 if ( PRINT_TO_CONSOLE && __DEV__ ) {
198216 console . log (
199217 'PerformanceLogger: Attempting to set an extra that already exists ' ,
@@ -211,6 +229,8 @@ class PerformanceLogger implements IPerformanceLogger {
211229 extras ? : Extras ,
212230 ) {
213231 if ( this . _closed ) {
232+ /* $FlowFixMe[constant-condition] Error discovered during Constant
233+ * Condition roll out. See https://fburl.com/workplace/1v97vimq. */
214234 if ( PRINT_TO_CONSOLE && __DEV__ ) {
215235 console . log (
216236 'PerformanceLogger: startTimespan - has closed ignoring: ' ,
@@ -221,6 +241,8 @@ class PerformanceLogger implements IPerformanceLogger {
221241 }
222242
223243 if ( this . _timespans [ key ] ) {
244+ /* $FlowFixMe[constant-condition] Error discovered during Constant
245+ * Condition roll out. See https://fburl.com/workplace/1v97vimq. */
224246 if ( PRINT_TO_CONSOLE && __DEV__ ) {
225247 console . log (
226248 'PerformanceLogger: Attempting to start a timespan that already exists ' ,
@@ -234,6 +256,8 @@ class PerformanceLogger implements IPerformanceLogger {
234256 startTime : timestamp ,
235257 startExtras : extras ,
236258 } ;
259+ /* $FlowFixMe[constant-condition] Error discovered during Constant
260+ * Condition roll out. See https://fburl.com/workplace/1v97vimq. */
237261 if ( PRINT_TO_CONSOLE ) {
238262 console . log ( 'PerformanceLogger.js' , 'start: ' + key ) ;
239263 }
@@ -245,6 +269,8 @@ class PerformanceLogger implements IPerformanceLogger {
245269 extras ? : Extras ,
246270 ) {
247271 if ( this . _closed ) {
272+ /* $FlowFixMe[constant-condition] Error discovered during Constant
273+ * Condition roll out. See https://fburl.com/workplace/1v97vimq. */
248274 if ( PRINT_TO_CONSOLE && __DEV__ ) {
249275 console . log (
250276 'PerformanceLogger: stopTimespan - has closed ignoring: ' ,
@@ -256,6 +282,8 @@ class PerformanceLogger implements IPerformanceLogger {
256282
257283 const timespan = this . _timespans [ key ] ;
258284 if ( ! timespan || timespan . startTime == null ) {
285+ /* $FlowFixMe[constant-condition] Error discovered during Constant
286+ * Condition roll out. See https://fburl.com/workplace/1v97vimq. */
259287 if ( PRINT_TO_CONSOLE && __DEV__ ) {
260288 console . log (
261289 'PerformanceLogger: Attempting to end a timespan that has not started ' ,
@@ -265,6 +293,8 @@ class PerformanceLogger implements IPerformanceLogger {
265293 return ;
266294 }
267295 if ( timespan . endTime != null ) {
296+ /* $FlowFixMe[constant-condition] Error discovered during Constant
297+ * Condition roll out. See https://fburl.com/workplace/1v97vimq. */
268298 if ( PRINT_TO_CONSOLE && __DEV__ ) {
269299 console . log (
270300 'PerformanceLogger: Attempting to end a timespan that has already ended ' ,
@@ -277,6 +307,8 @@ class PerformanceLogger implements IPerformanceLogger {
277307 timespan . endExtras = extras ;
278308 timespan . endTime = timestamp ;
279309 timespan . totalTime = timespan . endTime - ( timespan . startTime || 0 ) ;
310+ /* $FlowFixMe[constant-condition] Error discovered during Constant
311+ * Condition roll out. See https://fburl.com/workplace/1v97vimq. */
280312 if ( PRINT_TO_CONSOLE ) {
281313 console . log ( 'PerformanceLogger.js' , 'end: ' + key ) ;
282314 }
0 commit comments