Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ import type {
Timespan,
} from './IPerformanceLogger';

import * as Systrace from '../Performance/Systrace';
import infoLog from './infoLog';

const _cookies: {[key: string]: number, ...} = {};

const PRINT_TO_CONSOLE: false = false; // Type as false to prevent accidentally committing `true`;

export const getCurrentTimestamp: () => number =
Expand Down Expand Up @@ -233,7 +230,6 @@ class PerformanceLogger implements IPerformanceLogger {
startTime: timestamp,
startExtras: extras,
};
_cookies[key] = Systrace.beginAsyncEvent(key);
if (PRINT_TO_CONSOLE) {
infoLog('PerformanceLogger.js', 'start: ' + key);
}
Expand Down Expand Up @@ -277,11 +273,6 @@ class PerformanceLogger implements IPerformanceLogger {
if (PRINT_TO_CONSOLE) {
infoLog('PerformanceLogger.js', 'end: ' + key);
}

if (_cookies[key] != null) {
Systrace.endAsyncEvent(key, _cookies[key]);
delete _cookies[key];
}
}
}

Expand Down