mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 20:15:11 +00:00
Fix PerformanceLogger clearing unfinished events
Reviewed By: alexeylang Differential Revision: D4749516 fbshipit-source-id: 348f1cf51c01b39a410be8b39598e8e98cd52d55
This commit is contained in:
parent
0ea1ea5fb7
commit
005fbe6aa4
@ -98,6 +98,15 @@ var PerformanceLogger = {
|
|||||||
extras = {};
|
extras = {};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
clearCompleted() {
|
||||||
|
for (var key in timespans) {
|
||||||
|
if (timespans[key].totalTime) {
|
||||||
|
delete timespans[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
extras = {};
|
||||||
|
},
|
||||||
|
|
||||||
clearExceptTimespans(keys) {
|
clearExceptTimespans(keys) {
|
||||||
timespans = Object.keys(timespans).reduce(function(previous, key) {
|
timespans = Object.keys(timespans).reduce(function(previous, key) {
|
||||||
if (keys.indexOf(key) !== -1) {
|
if (keys.indexOf(key) !== -1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user