RN: Remove ReactPerf References

Reviewed By: fkgozali

Differential Revision: D8002194

fbshipit-source-id: a60073698d0f348d788b5c67e1c1c0010f7ec7f1
This commit is contained in:
Tim Yung 2018-05-15 13:08:46 -07:00 committed by Facebook Github Bot
parent 4a0243fcd3
commit 70066ecd2b
2 changed files with 1 additions and 39 deletions

View File

@ -12,15 +12,11 @@
const BridgeSpyStallHandler = require('BridgeSpyStallHandler');
const JSEventLoopWatchdog = require('JSEventLoopWatchdog');
const ReactPerfStallHandler = require('ReactPerfStallHandler');
const InteractionStallDebugger = {
install: function(options: {thresholdMS: number}) {
install(options: {thresholdMS: number}): void {
JSEventLoopWatchdog.install(options);
BridgeSpyStallHandler.register();
if (__DEV__) {
ReactPerfStallHandler.register();
}
},
};

View File

@ -1,34 +0,0 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/
'use strict';
const JSEventLoopWatchdog = require('JSEventLoopWatchdog');
const ReactPerf = require('ReactPerf');
const ReactPerfStallHandler = {
register: function() {
ReactPerf.start();
JSEventLoopWatchdog.addHandler({
onStall: () => {
ReactPerf.stop();
ReactPerf.printInclusive();
ReactPerf.printWasted();
ReactPerf.start();
},
onIterate: () => {
ReactPerf.stop();
ReactPerf.start();
},
});
},
};
module.exports = ReactPerfStallHandler;