Skip to content

Commit

Permalink
Fix PerformanceLogger clearing unfinished events
Browse files Browse the repository at this point in the history
Reviewed By: alexeylang

Differential Revision: D4749516

fbshipit-source-id: 348f1cf51c01b39a410be8b39598e8e98cd52d55
  • Loading branch information
javache authored and facebook-github-bot committed Mar 22, 2017
1 parent 0ea1ea5 commit 005fbe6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Libraries/Utilities/PerformanceLogger.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ var PerformanceLogger = {
extras = {};
},

clearCompleted() {
for (var key in timespans) {
if (timespans[key].totalTime) {
delete timespans[key];
}
}
extras = {};
},

clearExceptTimespans(keys) {
timespans = Object.keys(timespans).reduce(function(previous, key) {
if (keys.indexOf(key) !== -1) {
Expand Down

0 comments on commit 005fbe6

Please sign in to comment.