mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-31 17:18:45 +08:00
Rename BridgeProfiling to Systrace for consistency
Summary: public Rename the `BridgeProfiling` JS module to `Systrace`, since it's actually just an API to Systrace markers. This should make it clearer as we add more perf tooling. Reviewed By: jspahrsummers Differential Revision: D2734001 fb-gh-sync-id: 642848fa7340c545067f2a7cf5cef8af1c8a69a2
This commit is contained in:
committed by
facebook-github-bot-7
parent
44cbec28bd
commit
3549ff049c
@@ -165,8 +165,8 @@ function setUpWebSockets() {
|
||||
|
||||
function setUpProfile() {
|
||||
if (__DEV__) {
|
||||
var BridgeProfiling = require('BridgeProfiling');
|
||||
BridgeProfiling.swizzleReactPerf();
|
||||
var Systrace = require('Systrace');
|
||||
Systrace.swizzleReactPerf();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ var invariant = require('invariant');
|
||||
var keyMirror = require('keyMirror');
|
||||
var performanceNow = require('performanceNow');
|
||||
var warning = require('warning');
|
||||
var BridgeProfiling = require('BridgeProfiling');
|
||||
var Systrace = require('Systrace');
|
||||
|
||||
/**
|
||||
* JS implementation of timer functions. Must be completely driven by an
|
||||
@@ -113,7 +113,7 @@ var JSTimersExecution = {
|
||||
* more immediates are queued up (can be used as a condition a while loop).
|
||||
*/
|
||||
callImmediatesPass: function() {
|
||||
BridgeProfiling.profile('JSTimersExecution.callImmediatesPass()');
|
||||
Systrace.beginEvent('JSTimersExecution.callImmediatesPass()');
|
||||
|
||||
// The main reason to extract a single pass is so that we can track
|
||||
// in the system trace
|
||||
@@ -128,7 +128,7 @@ var JSTimersExecution = {
|
||||
}
|
||||
}
|
||||
|
||||
BridgeProfiling.profileEnd();
|
||||
Systrace.endEvent();
|
||||
|
||||
return JSTimersExecution.immediates.length > 0;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user