From 2927b769935b224d8a78dd8fb92f4bd29ff7f736 Mon Sep 17 00:00:00 2001 From: Tadeu Zagallo Date: Fri, 11 Dec 2015 03:49:15 -0800 Subject: [PATCH] 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 --- react-packager/src/Resolver/polyfills/require.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/react-packager/src/Resolver/polyfills/require.js b/react-packager/src/Resolver/polyfills/require.js index ebaa8c40..506d38e0 100644 --- a/react-packager/src/Resolver/polyfills/require.js +++ b/react-packager/src/Resolver/polyfills/require.js @@ -54,13 +54,13 @@ // require cycles inside the factory from causing an infinite require loop. mod.isInitialized = true; - __DEV__ && BridgeProfiling().profile('JS_require_' + id); + __DEV__ && Systrace().beginEvent('JS_require_' + id); // keep args in sync with with defineModuleCode in // packager/react-packager/src/Resolver/index.js mod.factory.call(global, global, require, mod.module, mod.module.exports); - __DEV__ && BridgeProfiling().profileEnd(); + __DEV__ && Systrace().endEvent(); } catch (e) { mod.hasError = true; mod.isInitialized = false; @@ -70,14 +70,14 @@ return mod.module.exports; } - const BridgeProfiling = __DEV__ && (() => { - var _BridgeProfiling; + const Systrace = __DEV__ && (() => { + var _Systrace; try { - _BridgeProfiling = require('BridgeProfiling'); + _Systrace = require('Systrace'); } catch(e) {} - return _BridgeProfiling && _BridgeProfiling.profile ? - _BridgeProfiling : { profile: () => {}, profileEnd: () => {} }; + return _Systrace && _Systrace.beginEvent ? + _Systrace : { beginEvent: () => {}, endEvent: () => {} }; }); global.__d = define;