Skip to content

Commit 93152ea

Browse files
committed
Place frames under experiment
1 parent 83c5d8f commit 93152ea

6 files changed

Lines changed: 10 additions & 2 deletions

File tree

front_end/core/host/UserMetrics.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,10 +985,11 @@ export enum DevtoolsExperiments {
985985
'timeline-alternative-navigation' = 104,
986986
// 106 was historically used [https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6230097]
987987
// next experiment should be 107
988+
'timeline-frames' = 108,
988989
/* eslint-enable @typescript-eslint/naming-convention */
989990

990991
// Increment this when new experiments are added.
991-
MAX_VALUE = 106,
992+
MAX_VALUE = 108,
992993
}
993994

994995
// Update DevToolsIssuesPanelIssueExpanded from tools/metrics/histograms/enums.xml if new enum is added.

front_end/core/root/Runtime.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ export const enum ExperimentName {
332332
TIMELINE_DEBUG_MODE = 'timeline-debug-mode',
333333
TIMELINE_ENHANCED_TRACES = 'timeline-enhanced-traces',
334334
TIMELINE_COMPILED_SOURCES = 'timeline-compiled-sources',
335+
TIMELINE_FRAMES = 'timeline-frames',
335336
TIMELINE_EXPERIMENTAL_INSIGHTS = 'timeline-experimental-insights',
336337
TIMELINE_DIM_UNRELATED_EVENTS = 'timeline-dim-unrelated-events',
337338
TIMELINE_ALTERNATIVE_NAVIGATION = 'timeline-alternative-navigation',

front_end/entrypoints/main/MainImpl.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ export class MainImpl {
301301
Root.Runtime.experiments.register(
302302
Root.Runtime.ExperimentName.TIMELINE_DEBUG_MODE,
303303
'Performance panel: Enable debug mode (trace event details, etc)', true);
304+
Root.Runtime.experiments.register(
305+
Root.Runtime.ExperimentName.TIMELINE_FRAMES, 'Performance panel: Enable frames track', true);
304306

305307
// Debugging
306308
Root.Runtime.experiments.register('instrumentation-breakpoints', 'Enable instrumentation breakpoints', true);

front_end/panels/timeline/TimelineFlameChartDataProvider.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,9 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
608608
// In CPU Profiles the trace data will not have frames nor
609609
// screenshots, so we can keep this call as it will be a no-op in
610610
// these cases.
611-
this.#appendFramesAndScreenshotsTrack();
611+
if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_FRAMES)) {
612+
this.#appendFramesAndScreenshotsTrack();
613+
}
612614

613615
const weight = (track: {type?: string, forMainFrame?: boolean, appenderName?: TrackAppenderName}): number => {
614616
switch (track.appenderName) {

front_end/testing/EnvironmentHelpers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ const REGISTERED_EXPERIMENTS = [
128128
Root.Runtime.ExperimentName.TIMELINE_EXPERIMENTAL_INSIGHTS,
129129
Root.Runtime.ExperimentName.TIMELINE_DIM_UNRELATED_EVENTS,
130130
Root.Runtime.ExperimentName.TIMELINE_ALTERNATIVE_NAVIGATION,
131+
Root.Runtime.ExperimentName.TIMELINE_FRAMES,
131132
Root.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI,
132133
Root.Runtime.ExperimentName.NOT_REACT_NATIVE_SPECIFIC_UI,
133134
];

front_end/ui/visual_logging/KnownContextValues.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3495,6 +3495,7 @@ export const knownContextValues = new Set([
34953495
'time',
34963496
'timeline',
34973497
'timeline-alternative-navigation',
3498+
'timeline-frames',
34983499
'timeline-capture-layers-and-pictures',
34993500
'timeline-capture-selector-stats',
35003501
'timeline-compiled-sources',

0 commit comments

Comments
 (0)