Skip to content

Commit a960134

Browse files
Connor ClarkDevtools-frontend LUCI CQ
authored andcommitted
[AI] Move eventKey into AICallTree.serialize
PerformanceTraceFormatter.formatCallTree was appending eventKey information after serializing the call tree. Instead, now AICallTree outputs it as part of its data format. Bug: 425270067 Change-Id: I664e2d97f45d5ce57c1c6ab56b656b8de9d1d48e Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6981109 Commit-Queue: Paul Irish <paulirish@chromium.org> Commit-Queue: Connor Clark <cjamcl@chromium.org> Reviewed-by: Paul Irish <paulirish@chromium.org> Auto-Submit: Connor Clark <cjamcl@chromium.org>
1 parent 397a013 commit a960134

File tree

6 files changed

+438
-748
lines changed

6 files changed

+438
-748
lines changed

front_end/models/ai_assistance/agents/PerformanceAgent.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,12 @@ When referring to an element for which you know the nodeId, annotate your output
147147

148148
const callFrameDataFormatDescription = `Each call frame is presented in the following format:
149149
150-
'id;name;duration;selfTime;urlIndex;childRange;[S]'
150+
'id;eventKey;name;duration;selfTime;urlIndex;childRange;[S]'
151151
152152
Key definitions:
153153
154154
* id: A unique numerical identifier for the call frame. Never mention this id in the output to the user.
155+
* eventKey: String that uniquely identifies this event in the flame chart.
155156
* name: A concise string describing the call frame (e.g., 'Evaluate Script', 'render', 'fetchData').
156157
* duration: The total execution time of the call frame, including its children.
157158
* selfTime: The time spent directly within the call frame, excluding its children's execution.
@@ -161,11 +162,11 @@ Key definitions:
161162
162163
Example Call Tree:
163164
164-
1;main;500;100;;
165-
2;update;200;50;;3
166-
3;animate;150;20;0;4-5;S
167-
4;calculatePosition;80;80;;
168-
5;applyStyles;50;50;;
165+
1;r-123;main;500;100;;
166+
2;r-124;update;200;50;;3
167+
3;p-49575-15428179-2834-374;animate;150;20;0;4-5;S
168+
4;p-49575-15428179-3505-1162;calculatePosition;80;80;;
169+
5;p-49575-15428179-5391-2767;applyStyles;50;50;;
169170
`;
170171

171172
enum ScorePriority {

0 commit comments

Comments
 (0)