From 005fbe6aa46d6866cb74bb721b310cee05da0103 Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Wed, 22 Mar 2017 05:36:40 -0700 Subject: [PATCH] Fix PerformanceLogger clearing unfinished events Reviewed By: alexeylang Differential Revision: D4749516 fbshipit-source-id: 348f1cf51c01b39a410be8b39598e8e98cd52d55 --- Libraries/Utilities/PerformanceLogger.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Libraries/Utilities/PerformanceLogger.js b/Libraries/Utilities/PerformanceLogger.js index 053abb9ae6c69f..e0f0ccbe3ffba1 100644 --- a/Libraries/Utilities/PerformanceLogger.js +++ b/Libraries/Utilities/PerformanceLogger.js @@ -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) {