Skip to content

Commit f9b646c

Browse files
Connor ClarkDevtools-frontend LUCI CQ
authored andcommitted
[RPP] Double trace record buffer to 400MB
Bug: 409086863 Change-Id: I830675c70abec47cd9b85261da9a30a8f1806ac5 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6443722 Auto-Submit: Connor Clark <[email protected]> Reviewed-by: Jack Franklin <[email protected]> Commit-Queue: Jack Franklin <[email protected]>
1 parent affeec8 commit f9b646c

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

front_end/models/trace/TracingManager.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describeWithMockConnection('TracingManager', () => {
4242
const client = new FakeClient();
4343
const bufferUsageSpy = sinon.spy(client, 'tracingBufferUsage');
4444

45-
await manager.start(client, 'devtools-timeline', 'options');
45+
await manager.start(client, 'devtools-timeline');
4646
manager.bufferUsage(10);
4747
assert.isTrue(bufferUsageSpy.calledWith(10));
4848
});
@@ -54,7 +54,7 @@ describeWithMockConnection('TracingManager', () => {
5454
const eventsRetrievalProgressSpy = sinon.spy(client, 'eventsRetrievalProgress');
5555
const eventsCollectedSpy = sinon.spy(client, 'traceEventsCollected');
5656

57-
await manager.start(client, 'devtools-timeline', 'options');
57+
await manager.start(client, 'devtools-timeline');
5858
manager.bufferUsage(0, 0);
5959

6060
manager.eventsCollected(fakeEvents);
@@ -67,7 +67,7 @@ describeWithMockConnection('TracingManager', () => {
6767
const manager = new Trace.TracingManager.TracingManager(target);
6868
const client = new FakeClient();
6969
const tracingCompleteSpy = sinon.spy(client, 'tracingComplete');
70-
await manager.start(client, 'devtools-timeline', 'options');
70+
await manager.start(client, 'devtools-timeline');
7171
manager.bufferUsage(0, 0);
7272
manager.eventsCollected(fakeEvents);
7373
manager.tracingComplete();
@@ -78,11 +78,11 @@ describeWithMockConnection('TracingManager', () => {
7878
const target = createTarget();
7979
const manager = new Trace.TracingManager.TracingManager(target);
8080
const client = new FakeClient();
81-
await manager.start(client, 'devtools-timeline', 'options');
81+
await manager.start(client, 'devtools-timeline');
8282
// The assert.throws() helper does not work with async/await, hence the manual try catch
8383
let didThrow = false;
8484
try {
85-
await manager.start(client, 'devtools-timeline', 'options');
85+
await manager.start(client, 'devtools-timeline');
8686
} catch (error) {
8787
didThrow = true;
8888
assert.strictEqual(error.message, 'Tracing is already started');

front_end/models/trace/TracingManager.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,20 @@ export class TracingManager extends SDK.SDKModel.SDKModel<void> {
6767
this.#finishing = false;
6868
}
6969

70-
// TODO(petermarshall): Use the traceConfig argument instead of deprecated
71-
// categories + options.
72-
async start(client: TracingManagerClient, categoryFilter: string, options: string):
73-
Promise<Protocol.ProtocolResponseWithError> {
70+
async start(client: TracingManagerClient, categoryFilter: string): Promise<Protocol.ProtocolResponseWithError> {
7471
if (this.#activeClient) {
7572
throw new Error('Tracing is already started');
7673
}
7774
const bufferUsageReportingIntervalMs = 500;
7875
this.#activeClient = client;
7976
const args = {
8077
bufferUsageReportingInterval: bufferUsageReportingIntervalMs,
81-
categories: categoryFilter,
82-
options,
8378
transferMode: Protocol.Tracing.StartRequestTransferMode.ReportEvents,
79+
traceConfig: {
80+
recordMode: Protocol.Tracing.TraceConfigRecordMode.RecordUntilFull,
81+
traceBufferSizeInKb: 400 * 1000,
82+
includedCategories: categoryFilter.split(','),
83+
},
8484
};
8585
const response = await this.#tracingAgent.invoke_start(args);
8686
if (response.getError()) {

front_end/panels/network/NetworkPanel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ export class FilmStripRecorder implements Trace.TracingManager.TracingManagerCli
957957

958958
this.tracingManager = tracingManager;
959959
this.resourceTreeModel = this.tracingManager.target().model(SDK.ResourceTreeModel.ResourceTreeModel);
960-
void this.tracingManager.start(this, '-*,disabled-by-default-devtools.screenshot', '');
960+
void this.tracingManager.start(this, '-*,disabled-by-default-devtools.screenshot');
961961

962962
Host.userMetrics.actionTaken(Host.UserMetrics.Action.FilmStripStartedRecording);
963963
}

front_end/panels/timeline/TimelineController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ export class TimelineController implements Trace.TracingManager.TracingManagerCl
236236
// all the functions data.
237237
await SDK.TargetManager.TargetManager.instance().suspendAllTargets('performance-timeline');
238238
this.tracingCompletePromise = Promise.withResolvers();
239-
const response = await this.tracingManager.start(this, categories, '');
239+
const response = await this.tracingManager.start(this, categories);
240240
await this.warmupJsProfiler();
241241
Extensions.ExtensionServer.ExtensionServer.instance().profilingStarted();
242242
return response;

front_end/services/tracing/PerformanceTracing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class PerformanceTracing implements Trace.TracingManager.TracingManagerCl
4545
'v8',
4646
].join(',');
4747

48-
const started = await this.#tracingManager.start(this, categories, '');
48+
const started = await this.#tracingManager.start(this, categories);
4949

5050
if (!started) {
5151
throw new Error('Unable to start tracing.');

0 commit comments

Comments
 (0)