@samitouri / QOS-React / commits / de84d5c107

Enable Profiler timing for DOM and RN dev bundles (#12823)

* Enable Profiler timing for DOM and RN dev bundles * Disable enableProfilerTimer feature flag for ReactIncrementalPerf-test

Brian Vaughn committed May 15, 2018 at 15:26 UTC de84d5c1079b12455058ee177fb3ff97cc0fb8d0
3 files changed +3 -2
packages/react-reconciler/src/__tests__/ReactIncrementalPerf-test.internal.js
+1
@@ -115,6 +115,7 @@ describe('ReactDebugFiberPerf', () => {
115 global.performance = createUserTimingPolyfill();
116
117 require('shared/ReactFeatureFlags').enableUserTimingAPI = true;
118 + require('shared/ReactFeatureFlags').enableProfilerTimer = false;
119 require('shared/ReactFeatureFlags').replayFailedUnitOfWorkWithInvokeGuardedCallback = false;
120
121 // Import after the polyfill is set up:
packages/shared/ReactFeatureFlags.js
+1 -1
@@ -40,7 +40,7 @@ export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__;
40 export const warnAboutDeprecatedLifecycles = false;
41
42 // Gather advanced timing metrics for Profiler subtrees.
43 -export const enableProfilerTimer = false;
43 +export const enableProfilerTimer = __DEV__;
44
45 // Fires getDerivedStateFromProps for state *or* props changes
46 export const fireGetDerivedStateFromPropsOnStateUpdates = true;
packages/shared/forks/ReactFeatureFlags.native-oss.js
+1 -1
@@ -22,7 +22,7 @@ export const enablePersistentReconciler = false;
22 export const enableUserTimingAPI = __DEV__;
23 export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__;
24 export const warnAboutDeprecatedLifecycles = false;
25 -export const enableProfilerTimer = false;
25 +export const enableProfilerTimer = __DEV__;
26 export const fireGetDerivedStateFromPropsOnStateUpdates = true;
27
28 // Only used in www builds.