Skip to content

Commit 6405efc

Browse files
author
Brian Vaughn
authored
Enabled Profiling feature flags for OSS release (#21565)
* Enabled Profiling feature flags for OSS release `enableProfilerCommitHooks` and `enableProfilerNestedUpdatePhase`
1 parent 0ae5290 commit 6405efc

8 files changed

+40
-40
lines changed

packages/react-devtools-shared/src/__tests__/__snapshots__/profilingCache-test.js.snap

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Object {
113113
},
114114
},
115115
"duration": 3,
116-
"effectDuration": null,
116+
"effectDuration": 0,
117117
"fiberActualDurations": Map {
118118
7 => 3,
119119
3 => 3,
@@ -122,7 +122,7 @@ Object {
122122
7 => 3,
123123
3 => 0,
124124
},
125-
"passiveEffectDuration": null,
125+
"passiveEffectDuration": 0,
126126
"priorityLevel": "Immediate",
127127
"timestamp": 18,
128128
"updaters": Array [
@@ -286,7 +286,7 @@ Object {
286286
},
287287
},
288288
"duration": 10,
289-
"effectDuration": null,
289+
"effectDuration": 0,
290290
"fiberActualDurations": Map {
291291
4 => 0,
292292
2 => 10,
@@ -297,7 +297,7 @@ Object {
297297
2 => 10,
298298
1 => 0,
299299
},
300-
"passiveEffectDuration": null,
300+
"passiveEffectDuration": 0,
301301
"priorityLevel": "Immediate",
302302
"timestamp": 35,
303303
"updaters": Array [
@@ -326,7 +326,7 @@ Object {
326326
},
327327
},
328328
"duration": 10,
329-
"effectDuration": null,
329+
"effectDuration": 0,
330330
"fiberActualDurations": Map {
331331
2 => 10,
332332
1 => 10,
@@ -335,7 +335,7 @@ Object {
335335
2 => 10,
336336
1 => 0,
337337
},
338-
"passiveEffectDuration": null,
338+
"passiveEffectDuration": 0,
339339
"priorityLevel": "Immediate",
340340
"timestamp": 45,
341341
"updaters": Array [
@@ -587,7 +587,7 @@ Object {
587587
],
588588
],
589589
"duration": 10,
590-
"effectDuration": null,
590+
"effectDuration": 0,
591591
"fiberActualDurations": Array [
592592
Array [
593593
4,
@@ -616,7 +616,7 @@ Object {
616616
0,
617617
],
618618
],
619-
"passiveEffectDuration": null,
619+
"passiveEffectDuration": 0,
620620
"priorityLevel": "Immediate",
621621
"timestamp": 35,
622622
"updaters": Array [
@@ -645,7 +645,7 @@ Object {
645645
],
646646
],
647647
"duration": 10,
648-
"effectDuration": null,
648+
"effectDuration": 0,
649649
"fiberActualDurations": Array [
650650
Array [
651651
2,
@@ -666,7 +666,7 @@ Object {
666666
0,
667667
],
668668
],
669-
"passiveEffectDuration": null,
669+
"passiveEffectDuration": 0,
670670
"priorityLevel": "Immediate",
671671
"timestamp": 45,
672672
"updaters": Array [
@@ -1367,7 +1367,7 @@ Object {
13671367
},
13681368
},
13691369
"duration": 10,
1370-
"effectDuration": null,
1370+
"effectDuration": 0,
13711371
"fiberActualDurations": Map {
13721372
4 => 0,
13731373
2 => 10,
@@ -1378,7 +1378,7 @@ Object {
13781378
2 => 10,
13791379
1 => 0,
13801380
},
1381-
"passiveEffectDuration": null,
1381+
"passiveEffectDuration": 0,
13821382
"priorityLevel": "Immediate",
13831383
"timestamp": 34,
13841384
"updaters": Array [
@@ -1404,7 +1404,7 @@ Object {
14041404
},
14051405
},
14061406
"duration": 10,
1407-
"effectDuration": null,
1407+
"effectDuration": 0,
14081408
"fiberActualDurations": Map {
14091409
2 => 10,
14101410
1 => 10,
@@ -1413,7 +1413,7 @@ Object {
14131413
2 => 10,
14141414
1 => 0,
14151415
},
1416-
"passiveEffectDuration": null,
1416+
"passiveEffectDuration": 0,
14171417
"priorityLevel": "Immediate",
14181418
"timestamp": 44,
14191419
"updaters": Array [
@@ -1683,10 +1683,10 @@ Object {
16831683
Object {
16841684
"changeDescriptions": Map {},
16851685
"duration": 0,
1686-
"effectDuration": null,
1686+
"effectDuration": 0,
16871687
"fiberActualDurations": Map {},
16881688
"fiberSelfDurations": Map {},
1689-
"passiveEffectDuration": null,
1689+
"passiveEffectDuration": 0,
16901690
"priorityLevel": "Normal",
16911691
"timestamp": 34,
16921692
"updaters": Array [
@@ -1900,7 +1900,7 @@ Object {
19001900
],
19011901
],
19021902
"duration": 10,
1903-
"effectDuration": null,
1903+
"effectDuration": 0,
19041904
"fiberActualDurations": Array [
19051905
Array [
19061906
4,
@@ -1929,7 +1929,7 @@ Object {
19291929
0,
19301930
],
19311931
],
1932-
"passiveEffectDuration": null,
1932+
"passiveEffectDuration": 0,
19331933
"priorityLevel": "Immediate",
19341934
"timestamp": 34,
19351935
"updaters": Array [
@@ -1958,7 +1958,7 @@ Object {
19581958
],
19591959
],
19601960
"duration": 10,
1961-
"effectDuration": null,
1961+
"effectDuration": 0,
19621962
"fiberActualDurations": Array [
19631963
Array [
19641964
2,
@@ -1979,7 +1979,7 @@ Object {
19791979
0,
19801980
],
19811981
],
1982-
"passiveEffectDuration": null,
1982+
"passiveEffectDuration": 0,
19831983
"priorityLevel": "Immediate",
19841984
"timestamp": 44,
19851985
"updaters": Array [
@@ -2306,10 +2306,10 @@ Object {
23062306
Object {
23072307
"changeDescriptions": Array [],
23082308
"duration": 0,
2309-
"effectDuration": null,
2309+
"effectDuration": 0,
23102310
"fiberActualDurations": Array [],
23112311
"fiberSelfDurations": Array [],
2312-
"passiveEffectDuration": null,
2312+
"passiveEffectDuration": 0,
23132313
"priorityLevel": "Normal",
23142314
"timestamp": 34,
23152315
"updaters": Array [
@@ -2494,7 +2494,7 @@ Object {
24942494
},
24952495
},
24962496
"duration": 0,
2497-
"effectDuration": null,
2497+
"effectDuration": 0,
24982498
"fiberActualDurations": Map {
24992499
1 => 0,
25002500
2 => 0,
@@ -2505,7 +2505,7 @@ Object {
25052505
2 => 0,
25062506
3 => 0,
25072507
},
2508-
"passiveEffectDuration": null,
2508+
"passiveEffectDuration": 0,
25092509
"priorityLevel": "Normal",
25102510
"timestamp": 0,
25112511
"updaters": Array [
@@ -2685,7 +2685,7 @@ Object {
26852685
],
26862686
],
26872687
"duration": 0,
2688-
"effectDuration": null,
2688+
"effectDuration": 0,
26892689
"fiberActualDurations": Array [
26902690
Array [
26912691
1,
@@ -2714,7 +2714,7 @@ Object {
27142714
0,
27152715
],
27162716
],
2717-
"passiveEffectDuration": null,
2717+
"passiveEffectDuration": 0,
27182718
"priorityLevel": "Normal",
27192719
"timestamp": 0,
27202720
"updaters": Array [

packages/shared/ReactFeatureFlags.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ export const warnAboutDeprecatedLifecycles = true;
4242
export const enableProfilerTimer = __PROFILE__;
4343

4444
// Record durations for commit and passive effects phases.
45-
export const enableProfilerCommitHooks = false;
45+
export const enableProfilerCommitHooks = __PROFILE__;
4646

4747
// Phase param passed to onRender callback differentiates between an "update" and a "cascading-update".
48-
export const enableProfilerNestedUpdatePhase = false;
48+
export const enableProfilerNestedUpdatePhase = __PROFILE__;
4949

5050
// Profiler API accepts a function to be called when a nested update is scheduled.
5151
// This callback accepts the component type (class instance or function) the update is scheduled for.

packages/shared/forks/ReactFeatureFlags.native-fb.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import typeof * as ExportsType from './ReactFeatureFlags.native-fb';
1414
export const enableDebugTracing = false;
1515
export const enableSchedulingProfiler = false;
1616
export const enableProfilerTimer = __PROFILE__;
17-
export const enableProfilerCommitHooks = false;
18-
export const enableProfilerNestedUpdatePhase = false;
17+
export const enableProfilerCommitHooks = __PROFILE__;
18+
export const enableProfilerNestedUpdatePhase = __PROFILE__;
1919
export const enableProfilerNestedUpdateScheduledHook = false;
2020
export const enableUpdaterTracking = false;
2121
export const enableSuspenseServerRenderer = false;

packages/shared/forks/ReactFeatureFlags.native-oss.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export const enableSchedulingProfiler = false;
1616
export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__;
1717
export const warnAboutDeprecatedLifecycles = true;
1818
export const enableProfilerTimer = __PROFILE__;
19-
export const enableProfilerCommitHooks = false;
20-
export const enableProfilerNestedUpdatePhase = false;
19+
export const enableProfilerCommitHooks = __PROFILE__;
20+
export const enableProfilerNestedUpdatePhase = __PROFILE__;
2121
export const enableProfilerNestedUpdateScheduledHook = false;
2222
export const enableUpdaterTracking = false;
2323
export const enableSuspenseServerRenderer = false;

packages/shared/forks/ReactFeatureFlags.test-renderer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export const enableSchedulingProfiler = false;
1616
export const warnAboutDeprecatedLifecycles = true;
1717
export const replayFailedUnitOfWorkWithInvokeGuardedCallback = false;
1818
export const enableProfilerTimer = __PROFILE__;
19-
export const enableProfilerCommitHooks = false;
20-
export const enableProfilerNestedUpdatePhase = false;
19+
export const enableProfilerCommitHooks = __PROFILE__;
20+
export const enableProfilerNestedUpdatePhase = __PROFILE__;
2121
export const enableProfilerNestedUpdateScheduledHook = false;
2222
export const enableUpdaterTracking = false;
2323
export const enableSuspenseServerRenderer = false;

packages/shared/forks/ReactFeatureFlags.test-renderer.native.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export const enableSchedulingProfiler = false;
1616
export const warnAboutDeprecatedLifecycles = true;
1717
export const replayFailedUnitOfWorkWithInvokeGuardedCallback = false;
1818
export const enableProfilerTimer = __PROFILE__;
19-
export const enableProfilerCommitHooks = false;
20-
export const enableProfilerNestedUpdatePhase = false;
19+
export const enableProfilerCommitHooks = __PROFILE__;
20+
export const enableProfilerNestedUpdatePhase = __PROFILE__;
2121
export const enableProfilerNestedUpdateScheduledHook = false;
2222
export const enableUpdaterTracking = false;
2323
export const enableSuspenseServerRenderer = false;

packages/shared/forks/ReactFeatureFlags.test-renderer.www.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export const enableSchedulingProfiler = false;
1616
export const warnAboutDeprecatedLifecycles = true;
1717
export const replayFailedUnitOfWorkWithInvokeGuardedCallback = false;
1818
export const enableProfilerTimer = __PROFILE__;
19-
export const enableProfilerCommitHooks = false;
20-
export const enableProfilerNestedUpdatePhase = false;
19+
export const enableProfilerCommitHooks = __PROFILE__;
20+
export const enableProfilerNestedUpdatePhase = __PROFILE__;
2121
export const enableProfilerNestedUpdateScheduledHook = false;
2222
export const enableUpdaterTracking = false;
2323
export const enableSuspenseServerRenderer = false;

packages/shared/forks/ReactFeatureFlags.testing.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export const enableSchedulingProfiler = false;
1616
export const warnAboutDeprecatedLifecycles = true;
1717
export const replayFailedUnitOfWorkWithInvokeGuardedCallback = false;
1818
export const enableProfilerTimer = __PROFILE__;
19-
export const enableProfilerCommitHooks = false;
20-
export const enableProfilerNestedUpdatePhase = false;
19+
export const enableProfilerCommitHooks = __PROFILE__;
20+
export const enableProfilerNestedUpdatePhase = __PROFILE__;
2121
export const enableProfilerNestedUpdateScheduledHook = false;
2222
export const enableUpdaterTracking = false;
2323
export const enableSuspenseServerRenderer = false;

0 commit comments

Comments
 (0)