diff --git a/Libraries/Utilities/PerformanceLogger.js b/Libraries/Utilities/PerformanceLogger.js index c05c4b7c2..c7f0e316c 100644 --- a/Libraries/Utilities/PerformanceLogger.js +++ b/Libraries/Utilities/PerformanceLogger.js @@ -24,7 +24,8 @@ var PerformanceLogger = { if (timespans[key]) { if (__DEV__) { console.log( - 'PerformanceLogger: Attempting to add a timespan that already exists' + 'PerformanceLogger: Attempting to add a timespan that already exists ', + key ); } return; @@ -40,7 +41,8 @@ var PerformanceLogger = { if (timespans[key]) { if (__DEV__) { console.log( - 'PerformanceLogger: Attempting to start a timespan that already exists' + 'PerformanceLogger: Attempting to start a timespan that already exists ', + key, ); } return; @@ -56,7 +58,8 @@ var PerformanceLogger = { if (!timespans[key] || !timespans[key].startTime) { if (__DEV__) { console.log( - 'PerformanceLogger: Attempting to end a timespan that has not started' + 'PerformanceLogger: Attempting to end a timespan that has not started ', + key, ); } return; @@ -75,6 +78,10 @@ var PerformanceLogger = { return timespans; }, + hasTimespan(key) { + return !!timespans[key]; + }, + logTimespans() { for (var key in timespans) { console.log(key + ': ' + timespans[key].totalTime + 'ms');