@zenfg/inspector 0.1.0-beta.3 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GUIDE.md +182 -0
- package/README.md +61 -89
- package/THEMING.md +124 -0
- package/dist/FrameGraphInspector.d.ts +23 -4
- package/dist/FrameGraphInspector.d.ts.map +1 -1
- package/dist/FrameGraphInspector.js +137 -29
- package/dist/FrameGraphInspector.js.map +1 -1
- package/dist/capture.d.ts +5 -0
- package/dist/capture.d.ts.map +1 -0
- package/dist/capture.js +2 -0
- package/dist/capture.js.map +1 -0
- package/dist/debugCaptureModel.d.ts +19 -0
- package/dist/debugCaptureModel.d.ts.map +1 -1
- package/dist/debugCaptureModel.js +36 -2
- package/dist/debugCaptureModel.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/panelAliasAnalysis.d.ts +1 -0
- package/dist/panelAliasAnalysis.d.ts.map +1 -1
- package/dist/panelAliasAnalysis.js +23 -54
- package/dist/panelAliasAnalysis.js.map +1 -1
- package/dist/panelCytoscapeGraphRenderer.d.ts +15 -2
- package/dist/panelCytoscapeGraphRenderer.d.ts.map +1 -1
- package/dist/panelCytoscapeGraphRenderer.js +145 -23
- package/dist/panelCytoscapeGraphRenderer.js.map +1 -1
- package/dist/panelDetailLayout.d.ts +27 -0
- package/dist/panelDetailLayout.d.ts.map +1 -0
- package/dist/panelDetailLayout.js +174 -0
- package/dist/panelDetailLayout.js.map +1 -0
- package/dist/panelDetailStyles.d.ts +2 -0
- package/dist/panelDetailStyles.d.ts.map +1 -0
- package/dist/panelDetailStyles.js +57 -0
- package/dist/panelDetailStyles.js.map +1 -0
- package/dist/panelDiagnosticsView.d.ts +10 -1
- package/dist/panelDiagnosticsView.d.ts.map +1 -1
- package/dist/panelDiagnosticsView.js +166 -57
- package/dist/panelDiagnosticsView.js.map +1 -1
- package/dist/panelDomHelpers.d.ts.map +1 -1
- package/dist/panelDomHelpers.js +6 -5
- package/dist/panelDomHelpers.js.map +1 -1
- package/dist/panelGraphLayout.d.ts +3 -2
- package/dist/panelGraphLayout.d.ts.map +1 -1
- package/dist/panelGraphLayout.js +6 -5
- package/dist/panelGraphLayout.js.map +1 -1
- package/dist/panelGraphRenderer.d.ts +10 -0
- package/dist/panelGraphRenderer.d.ts.map +1 -1
- package/dist/panelGraphRenderer.js.map +1 -1
- package/dist/panelGraphScene.d.ts +1 -0
- package/dist/panelGraphScene.d.ts.map +1 -1
- package/dist/panelGraphScene.js +69 -32
- package/dist/panelGraphScene.js.map +1 -1
- package/dist/panelGraphSearch.d.ts +16 -0
- package/dist/panelGraphSearch.d.ts.map +1 -0
- package/dist/panelGraphSearch.js +93 -0
- package/dist/panelGraphSearch.js.map +1 -0
- package/dist/panelGraphView.d.ts +82 -0
- package/dist/panelGraphView.d.ts.map +1 -1
- package/dist/panelGraphView.js +15 -4
- package/dist/panelGraphView.js.map +1 -1
- package/dist/panelGraphVisuals.d.ts +14 -6
- package/dist/panelGraphVisuals.d.ts.map +1 -1
- package/dist/panelGraphVisuals.js +126 -51
- package/dist/panelGraphVisuals.js.map +1 -1
- package/dist/panelInspectorView.d.ts +8 -0
- package/dist/panelInspectorView.d.ts.map +1 -1
- package/dist/panelInspectorView.js +242 -48
- package/dist/panelInspectorView.js.map +1 -1
- package/dist/panelListStyles.d.ts +3 -0
- package/dist/panelListStyles.d.ts.map +1 -0
- package/dist/panelListStyles.js +155 -0
- package/dist/panelListStyles.js.map +1 -0
- package/dist/panelMemoryStyles.d.ts +3 -0
- package/dist/panelMemoryStyles.d.ts.map +1 -0
- package/dist/panelMemoryStyles.js +42 -0
- package/dist/panelMemoryStyles.js.map +1 -0
- package/dist/panelMemoryView.d.ts +13 -1
- package/dist/panelMemoryView.d.ts.map +1 -1
- package/dist/panelMemoryView.js +161 -41
- package/dist/panelMemoryView.js.map +1 -1
- package/dist/panelPassesView.d.ts +15 -0
- package/dist/panelPassesView.d.ts.map +1 -1
- package/dist/panelPassesView.js +202 -72
- package/dist/panelPassesView.js.map +1 -1
- package/dist/panelRawView.d.ts +15 -0
- package/dist/panelRawView.d.ts.map +1 -0
- package/dist/panelRawView.js +105 -0
- package/dist/panelRawView.js.map +1 -0
- package/dist/panelResourcesView.d.ts +8 -0
- package/dist/panelResourcesView.d.ts.map +1 -1
- package/dist/panelResourcesView.js +62 -31
- package/dist/panelResourcesView.js.map +1 -1
- package/dist/panelSelection.d.ts +9 -1
- package/dist/panelSelection.d.ts.map +1 -1
- package/dist/panelSelection.js +34 -4
- package/dist/panelSelection.js.map +1 -1
- package/dist/panelTheme.d.ts +13 -0
- package/dist/panelTheme.d.ts.map +1 -0
- package/dist/panelTheme.js +104 -0
- package/dist/panelTheme.js.map +1 -0
- package/dist/panelTypes.d.ts +10 -1
- package/dist/panelTypes.d.ts.map +1 -1
- package/dist/panelTypes.js.map +1 -1
- package/dist/panelVisualTheme.d.ts +147 -50
- package/dist/panelVisualTheme.d.ts.map +1 -1
- package/dist/panelVisualTheme.js +34 -44
- package/dist/panelVisualTheme.js.map +1 -1
- package/dist/panelWorkbenchHelpers.d.ts +12 -1
- package/dist/panelWorkbenchHelpers.d.ts.map +1 -1
- package/dist/panelWorkbenchHelpers.js +62 -1
- package/dist/panelWorkbenchHelpers.js.map +1 -1
- package/dist/panelWorkbenchStyles.d.ts +2 -0
- package/dist/panelWorkbenchStyles.d.ts.map +1 -0
- package/dist/panelWorkbenchStyles.js +101 -0
- package/dist/panelWorkbenchStyles.js.map +1 -0
- package/dist/panelWorkbenchView.d.ts +16 -0
- package/dist/panelWorkbenchView.d.ts.map +1 -1
- package/dist/panelWorkbenchView.js +228 -50
- package/dist/panelWorkbenchView.js.map +1 -1
- package/dist/query.js.map +1 -1
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +147 -195
- package/dist/styles.js.map +1 -1
- package/dist/theme.d.ts +22 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +10 -0
- package/dist/theme.js.map +1 -0
- package/dist/themeDefinitions.d.ts +251 -0
- package/dist/themeDefinitions.d.ts.map +1 -0
- package/dist/themeDefinitions.js +96 -0
- package/dist/themeDefinitions.js.map +1 -0
- package/dist/themePalette.d.ts +66 -0
- package/dist/themePalette.d.ts.map +1 -0
- package/dist/themePalette.js +37 -0
- package/dist/themePalette.js.map +1 -0
- package/dist/themes.css +165 -0
- package/package.json +44 -10
- package/src/FrameGraphInspector.ts +130 -31
- package/src/capture.ts +4 -0
- package/src/debugCaptureModel.ts +53 -2
- package/src/index.ts +6 -2
- package/src/panelAliasAnalysis.ts +24 -70
- package/src/panelCytoscapeGraphRenderer.ts +140 -23
- package/src/panelDetailLayout.ts +155 -0
- package/src/panelDetailStyles.ts +56 -0
- package/src/panelDiagnosticsView.ts +166 -85
- package/src/panelDomHelpers.ts +4 -5
- package/src/panelGraphLayout.ts +6 -5
- package/src/panelGraphRenderer.ts +7 -0
- package/src/panelGraphScene.ts +68 -30
- package/src/panelGraphSearch.ts +96 -0
- package/src/panelGraphView.ts +14 -4
- package/src/panelGraphVisuals.ts +122 -52
- package/src/panelInspectorView.ts +227 -48
- package/src/panelListStyles.ts +154 -0
- package/src/panelMemoryStyles.ts +41 -0
- package/src/panelMemoryView.ts +178 -53
- package/src/panelPassesView.ts +190 -137
- package/src/panelRawView.ts +99 -0
- package/src/panelResourcesView.ts +69 -56
- package/src/panelSelection.ts +37 -5
- package/src/panelTheme.ts +85 -0
- package/src/panelTypes.ts +7 -1
- package/src/panelVisualTheme.ts +38 -49
- package/src/panelWorkbenchHelpers.ts +60 -2
- package/src/panelWorkbenchStyles.ts +100 -0
- package/src/panelWorkbenchView.ts +201 -52
- package/src/query.ts +11 -11
- package/src/styles.ts +148 -195
- package/src/theme.ts +24 -0
- package/src/themeDefinitions.ts +103 -0
- package/src/themePalette.ts +44 -0
package/dist/panelPassesView.js
CHANGED
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import { createCell,
|
|
2
|
-
import { createEmptyTableRow, createKindCell, createFilterSelect, createSearchInput, createSelectionCell, createTableScroller, createViewToolbar, groupPath, registerSelectable, updateSelectedRows, } from "./panelWorkbenchHelpers.js";
|
|
1
|
+
import { createCell, labelNode } from "./panelDomHelpers.js";
|
|
2
|
+
import { createEmptyTableRow, createKindCell, createFilterSelect, createSearchInput, createSelectionCell, createTableScroller, createViewToolbar, enableTabKeyboard, formatMeasuredGpuWork, formatTimingCoverage, groupPath, registerSelectable, selectionKey, updateSelectedRows, } from "./panelWorkbenchHelpers.js";
|
|
3
3
|
export class PassesView {
|
|
4
4
|
callbacks;
|
|
5
5
|
root = document.createElement('section');
|
|
6
6
|
toolbar = createViewToolbar('Pass filters and sorting');
|
|
7
|
+
groupToolbar = createViewToolbar('Group search');
|
|
7
8
|
tabList = document.createElement('div');
|
|
8
9
|
listButton = this.createSubviewButton('list', 'Pass List');
|
|
9
10
|
groupsButton = this.createSubviewButton('groups', 'Group Hierarchy');
|
|
10
11
|
listPane = document.createElement('div');
|
|
11
12
|
groupsPane = document.createElement('div');
|
|
12
13
|
listTable = createTableScroller([
|
|
13
|
-
{ label: 'Order', column: 'numeric' },
|
|
14
|
-
{ label: '
|
|
15
|
-
{ label: 'Label' },
|
|
16
|
-
{ label: 'Group' },
|
|
17
|
-
{ label: 'Kind', column: 'kind' },
|
|
18
|
-
{ label: 'GPU (ms)', column: 'numeric' },
|
|
19
|
-
{ label: 'Reads', column: 'numeric' },
|
|
20
|
-
{ label: 'Writes', column: 'numeric' },
|
|
14
|
+
{ label: 'Name' }, { label: 'Compile state', column: 'kind' }, { label: 'Order', column: 'numeric' },
|
|
15
|
+
{ label: 'Kind', column: 'kind' }, { label: 'CPU (ms)', column: 'numeric' }, { label: 'GPU (ms)', column: 'numeric' }, { label: 'R / W', column: 'numeric' },
|
|
21
16
|
]);
|
|
22
17
|
groupsTable = createTableScroller([
|
|
23
|
-
{ label: '' },
|
|
24
|
-
{ label: '
|
|
25
|
-
{ label: '
|
|
26
|
-
{ label: 'Culled', column: 'numeric' },
|
|
27
|
-
{ label: 'GPU work', column: 'numeric' },
|
|
28
|
-
{ label: 'Inputs', column: 'numeric' },
|
|
29
|
-
{ label: 'Outputs', column: 'numeric' },
|
|
18
|
+
{ label: 'Group' }, { label: 'Retained', column: 'numeric' }, { label: 'Culled', column: 'numeric' },
|
|
19
|
+
{ label: 'CPU sum / coverage', column: 'numeric' }, { label: 'GPU pass sum', column: 'numeric' }, { label: 'Inputs', column: 'numeric' },
|
|
20
|
+
{ label: 'Outputs', column: 'numeric' }, { label: 'Locate' },
|
|
30
21
|
]);
|
|
31
22
|
rows = new Map();
|
|
23
|
+
collapsedGroups = new Set();
|
|
24
|
+
count = document.createElement('span');
|
|
25
|
+
groupCount = document.createElement('span');
|
|
26
|
+
timing = document.createElement('p');
|
|
27
|
+
searchInput;
|
|
28
|
+
groupSearchInput;
|
|
29
|
+
kindSelect;
|
|
30
|
+
statusSelect;
|
|
32
31
|
snapshot;
|
|
33
32
|
selected;
|
|
34
33
|
subview = 'list';
|
|
35
34
|
search = '';
|
|
35
|
+
groupSearch = '';
|
|
36
36
|
kind = 'all';
|
|
37
|
+
status = 'all';
|
|
37
38
|
sort = 'order';
|
|
38
39
|
constructor(callbacks, idPrefix) {
|
|
39
40
|
this.callbacks = callbacks;
|
|
@@ -44,32 +45,44 @@ export class PassesView {
|
|
|
44
45
|
this.tabList.setAttribute('role', 'tablist');
|
|
45
46
|
this.tabList.setAttribute('aria-label', 'Pass views');
|
|
46
47
|
this.tabList.append(this.listButton, this.groupsButton);
|
|
47
|
-
|
|
48
|
+
enableTabKeyboard(this.tabList);
|
|
49
|
+
this.searchInput = createSearchInput('Search pass, ID or group', '', (value) => {
|
|
48
50
|
this.search = value.trim().toLocaleLowerCase();
|
|
49
51
|
this.renderRows();
|
|
50
52
|
});
|
|
51
|
-
|
|
52
|
-
['all', 'All
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
['copy', 'Copy'],
|
|
56
|
-
['clear-buffer', 'Clear Buffer'],
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
this.statusSelect = createFilterSelect('Pass compile state', this.status, [
|
|
54
|
+
['all', 'All'], ['retained', 'Retained'], ['culled', 'Culled'],
|
|
55
|
+
], (value) => { this.status = value; this.renderRows(); });
|
|
56
|
+
this.kindSelect = createFilterSelect('Pass kind', this.kind, [
|
|
57
|
+
['all', 'All kinds'], ['render', 'Render'], ['compute', 'Compute'], ['copy', 'Copy'],
|
|
58
|
+
['clear-buffer', 'Clear Buffer'], ['command', 'Command'], ['external-submission', 'External'],
|
|
59
|
+
], (value) => { this.kind = value; this.renderRows(); });
|
|
60
|
+
const sort = createFilterSelect('Sort passes', this.sort, [
|
|
61
|
+
['order', 'Execution order'], ['label', 'Name'], ['kind', 'Kind'], ['gpu', 'GPU: slowest first'], ['cpu', 'CPU: slowest first'],
|
|
62
|
+
], (value) => { this.sort = value; this.renderRows(); });
|
|
63
|
+
const clear = document.createElement('button');
|
|
64
|
+
clear.type = 'button';
|
|
65
|
+
clear.textContent = 'Clear filters';
|
|
66
|
+
clear.addEventListener('click', () => { this.clearFilters(); this.renderRows(); });
|
|
67
|
+
this.count.className = 'zenfg-inspector-result-count';
|
|
68
|
+
this.count.setAttribute('role', 'status');
|
|
69
|
+
this.toolbar.append(this.searchInput, this.statusSelect, this.kindSelect, sort, clear, this.count);
|
|
70
|
+
this.groupSearchInput = createSearchInput('Search group path or ID', '', (value) => {
|
|
71
|
+
this.groupSearch = value.trim().toLocaleLowerCase();
|
|
61
72
|
this.renderRows();
|
|
62
73
|
});
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
this.sort = value;
|
|
74
|
+
const clearGroups = document.createElement('button');
|
|
75
|
+
clearGroups.type = 'button';
|
|
76
|
+
clearGroups.textContent = 'Clear filters';
|
|
77
|
+
clearGroups.addEventListener('click', () => {
|
|
78
|
+
this.groupSearch = '';
|
|
79
|
+
this.groupSearchInput.value = '';
|
|
70
80
|
this.renderRows();
|
|
71
81
|
});
|
|
72
|
-
this.
|
|
82
|
+
this.groupCount.className = 'zenfg-inspector-result-count';
|
|
83
|
+
this.groupCount.setAttribute('role', 'status');
|
|
84
|
+
this.groupToolbar.append(this.groupSearchInput, clearGroups, this.groupCount);
|
|
85
|
+
this.timing.className = 'zenfg-inspector-list-context';
|
|
73
86
|
this.listButton.id = `${idPrefix}-list-subtab`;
|
|
74
87
|
this.listButton.setAttribute('aria-controls', `${idPrefix}-pass-list-panel`);
|
|
75
88
|
this.groupsButton.id = `${idPrefix}-groups-subtab`;
|
|
@@ -84,7 +97,7 @@ export class PassesView {
|
|
|
84
97
|
this.groupsPane.setAttribute('role', 'tabpanel');
|
|
85
98
|
this.groupsPane.setAttribute('aria-labelledby', this.groupsButton.id);
|
|
86
99
|
this.groupsPane.appendChild(this.groupsTable.scroller);
|
|
87
|
-
this.root.append(this.tabList, this.toolbar, this.listPane, this.groupsPane);
|
|
100
|
+
this.root.append(this.tabList, this.toolbar, this.groupToolbar, this.timing, this.listPane, this.groupsPane);
|
|
88
101
|
this.updateSubview();
|
|
89
102
|
}
|
|
90
103
|
setSnapshot(snapshot) {
|
|
@@ -92,6 +105,9 @@ export class PassesView {
|
|
|
92
105
|
if (snapshot.debugGroups.length === 0 && this.subview === 'groups')
|
|
93
106
|
this.subview = 'list';
|
|
94
107
|
this.groupsButton.disabled = snapshot.debugGroups.length === 0;
|
|
108
|
+
for (const path of this.collapsedGroups)
|
|
109
|
+
if (!snapshot.groupByPathKey.has(path))
|
|
110
|
+
this.collapsedGroups.delete(path);
|
|
95
111
|
this.renderRows();
|
|
96
112
|
this.updateSubview();
|
|
97
113
|
}
|
|
@@ -99,25 +115,65 @@ export class PassesView {
|
|
|
99
115
|
this.selected = selected;
|
|
100
116
|
updateSelectedRows(this.rows, selected);
|
|
101
117
|
}
|
|
118
|
+
showCulled() {
|
|
119
|
+
this.clearFilters();
|
|
120
|
+
this.status = 'culled';
|
|
121
|
+
this.statusSelect.value = 'culled';
|
|
122
|
+
this.subview = 'list';
|
|
123
|
+
this.updateSubview();
|
|
124
|
+
this.renderRows();
|
|
125
|
+
}
|
|
126
|
+
reveal(selection) {
|
|
127
|
+
if (selection.kind === 'group') {
|
|
128
|
+
this.subview = 'groups';
|
|
129
|
+
this.groupSearch = '';
|
|
130
|
+
this.groupSearchInput.value = '';
|
|
131
|
+
const group = this.snapshot?.groupByPathKey.get(selection.pathKey);
|
|
132
|
+
for (const id of group?.ancestorIds ?? []) {
|
|
133
|
+
const ancestor = this.snapshot?.groupById.get(id);
|
|
134
|
+
if (ancestor)
|
|
135
|
+
this.collapsedGroups.delete(ancestor.pathKey);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
else if (selection.kind === 'node' || selection.kind === 'culled') {
|
|
139
|
+
this.subview = 'list';
|
|
140
|
+
this.clearFilters();
|
|
141
|
+
}
|
|
142
|
+
else
|
|
143
|
+
return;
|
|
144
|
+
this.updateSubview();
|
|
145
|
+
this.renderRows();
|
|
146
|
+
this.rows.get(selectionKey(selection))?.[0]?.scrollIntoView?.({ block: 'nearest' });
|
|
147
|
+
}
|
|
148
|
+
clearFilters() {
|
|
149
|
+
this.search = '';
|
|
150
|
+
this.kind = 'all';
|
|
151
|
+
this.status = 'all';
|
|
152
|
+
this.searchInput.value = '';
|
|
153
|
+
this.kindSelect.value = 'all';
|
|
154
|
+
this.statusSelect.value = 'all';
|
|
155
|
+
}
|
|
102
156
|
createSubviewButton(subview, label) {
|
|
103
157
|
const button = document.createElement('button');
|
|
104
158
|
button.type = 'button';
|
|
105
159
|
button.textContent = label;
|
|
106
160
|
button.setAttribute('role', 'tab');
|
|
107
|
-
button.addEventListener('click', () => {
|
|
108
|
-
this.subview = subview;
|
|
109
|
-
this.updateSubview();
|
|
110
|
-
});
|
|
161
|
+
button.addEventListener('click', () => { this.subview = subview; this.updateSubview(); });
|
|
111
162
|
return button;
|
|
112
163
|
}
|
|
113
164
|
updateSubview() {
|
|
114
165
|
const listActive = this.subview === 'list';
|
|
115
|
-
this.listButton.setAttribute('aria-selected', listActive
|
|
116
|
-
this.groupsButton.setAttribute('aria-selected', listActive
|
|
166
|
+
this.listButton.setAttribute('aria-selected', String(listActive));
|
|
167
|
+
this.groupsButton.setAttribute('aria-selected', String(!listActive));
|
|
168
|
+
this.listButton.tabIndex = listActive ? 0 : -1;
|
|
169
|
+
this.groupsButton.tabIndex = listActive ? -1 : 0;
|
|
117
170
|
this.listButton.classList.toggle('active', listActive);
|
|
118
171
|
this.groupsButton.classList.toggle('active', !listActive);
|
|
119
172
|
this.listPane.hidden = !listActive;
|
|
120
173
|
this.groupsPane.hidden = listActive;
|
|
174
|
+
this.toolbar.hidden = !listActive;
|
|
175
|
+
this.groupToolbar.hidden = listActive;
|
|
176
|
+
this.timing.hidden = !listActive;
|
|
121
177
|
}
|
|
122
178
|
renderRows() {
|
|
123
179
|
const snapshot = this.snapshot;
|
|
@@ -126,57 +182,131 @@ export class PassesView {
|
|
|
126
182
|
this.rows.clear();
|
|
127
183
|
this.listTable.body.replaceChildren();
|
|
128
184
|
this.groupsTable.body.replaceChildren();
|
|
129
|
-
const
|
|
185
|
+
const entries = snapshot.protocol.graph.nodes.flatMap((canonical, index) => {
|
|
186
|
+
const node = snapshot.nodeById.get(canonical.id) ?? snapshot.culledById.get(canonical.id)?.node;
|
|
187
|
+
if (!node)
|
|
188
|
+
return [];
|
|
189
|
+
return [{ node,
|
|
190
|
+
selection: { kind: canonical.compileState.status === 'retained' ? 'node' : 'culled', id: node.id },
|
|
191
|
+
order: canonical.compileState.status === 'retained' ? canonical.compileState.executionOrder : undefined,
|
|
192
|
+
recordingOrder: canonical.recordingOrder ?? index,
|
|
193
|
+
}];
|
|
194
|
+
});
|
|
195
|
+
const passes = entries.filter((entry) => this.matchesNode(snapshot, entry));
|
|
130
196
|
passes.sort((a, b) => this.compareNodes(a, b));
|
|
131
|
-
|
|
132
|
-
|
|
197
|
+
this.count.textContent = `${passes.length} / ${entries.length} passes`;
|
|
198
|
+
const metrics = snapshot.metrics;
|
|
199
|
+
this.timing.textContent = `Retained means kept by compilation. CPU timing: ${formatTimingCoverage(metrics.cpuTimedNodeCount, snapshot.nodes.length)}. GPU timing: ${formatTimingCoverage(metrics.timedNodeCount, metrics.timingEligibleNodeCount)}${snapshot.profiling.status === 'unavailable' ? ` (${snapshot.profiling.reason})` : ''}.`;
|
|
200
|
+
for (const { node, selection, order } of passes) {
|
|
133
201
|
const row = document.createElement('tr');
|
|
134
202
|
registerSelectable(this.rows, row, selection, this.callbacks);
|
|
135
|
-
const
|
|
136
|
-
|
|
203
|
+
const labelCell = createSelectionCell(labelNode(node), selection, this.callbacks);
|
|
204
|
+
labelCell.title = node.id;
|
|
205
|
+
if (node.debugGroupId !== undefined) {
|
|
206
|
+
const group = document.createElement('small');
|
|
207
|
+
group.textContent = groupPath(snapshot, node.debugGroupId);
|
|
208
|
+
labelCell.appendChild(group);
|
|
209
|
+
}
|
|
210
|
+
const stateCell = createKindCell(selection.kind === 'culled' ? 'culled' : 'retained', selection.kind === 'culled' ? 'Culled' : 'Retained');
|
|
211
|
+
stateCell.title = selection.kind === 'culled' ? snapshot.culledById.get(node.id)?.reason ?? '' : 'Kept by compilation; this does not prove GPU execution.';
|
|
212
|
+
const gpu = selection.kind === 'culled' ? 'Not applicable' : node.kind === 'external-submission' ? 'Opaque'
|
|
213
|
+
: node.gpuDurationMicros !== undefined ? (node.gpuDurationMicros / 1000).toFixed(3)
|
|
214
|
+
: node.kind === 'render' || node.kind === 'compute' ? 'Not collected' : 'Not applicable';
|
|
215
|
+
const cpu = selection.kind === 'culled' ? 'Not executed' : node.cpuDurationMicros === undefined ? 'Not collected' : (node.cpuDurationMicros / 1000).toFixed(3);
|
|
216
|
+
const cpuCell = createCell(cpu, { column: 'numeric' });
|
|
217
|
+
cpuCell.title = 'Synchronous elapsed time; zero may reflect clock precision. External nodes include synchronous submission.';
|
|
218
|
+
row.append(labelCell, stateCell, createCell(order === undefined ? 'Not applicable' : String(order), { column: 'numeric' }), createKindCell(node.kind), cpuCell, createCell(gpu, { column: 'numeric' }), createCell(`${node.reads.length} / ${node.writes.length}`, { column: 'numeric' }));
|
|
137
219
|
this.listTable.body.appendChild(row);
|
|
138
220
|
}
|
|
139
221
|
if (passes.length === 0)
|
|
140
|
-
this.listTable.body.appendChild(createEmptyTableRow(
|
|
141
|
-
|
|
142
|
-
|
|
222
|
+
this.listTable.body.appendChild(createEmptyTableRow(7, 'No passes match the current filters.'));
|
|
223
|
+
this.renderGroups(snapshot);
|
|
224
|
+
updateSelectedRows(this.rows, this.selected);
|
|
225
|
+
}
|
|
226
|
+
renderGroups(snapshot) {
|
|
227
|
+
const included = new Set();
|
|
228
|
+
const childrenByParent = new Map();
|
|
229
|
+
for (const group of snapshot.debugGroups) {
|
|
230
|
+
const siblings = childrenByParent.get(group.parentId) ?? [];
|
|
231
|
+
siblings.push(group);
|
|
232
|
+
childrenByParent.set(group.parentId, siblings);
|
|
233
|
+
}
|
|
234
|
+
// Parent-before-child capture order need not be depth-first; keep each subtree together.
|
|
235
|
+
const orderedGroups = [];
|
|
236
|
+
const pending = [...(childrenByParent.get(undefined) ?? [])].reverse();
|
|
237
|
+
while (pending.length) {
|
|
238
|
+
const group = pending.pop();
|
|
239
|
+
orderedGroups.push(group);
|
|
240
|
+
pending.push(...[...(childrenByParent.get(group.id) ?? [])].reverse());
|
|
241
|
+
}
|
|
242
|
+
const parents = new Set(childrenByParent.keys());
|
|
243
|
+
if (this.groupSearch)
|
|
244
|
+
for (const group of snapshot.debugGroups) {
|
|
245
|
+
if (`${group.path.join(' / ')} ${group.id}`.toLocaleLowerCase().includes(this.groupSearch)) {
|
|
246
|
+
for (const id of group.ancestorIds)
|
|
247
|
+
included.add(id);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
const groups = orderedGroups.filter((group) => this.groupSearch ? included.has(group.id)
|
|
251
|
+
: !group.ancestorIds.slice(0, -1).some((id) => this.collapsedGroups.has(snapshot.groupById.get(id).pathKey)));
|
|
252
|
+
this.groupCount.textContent = `${groups.length} / ${snapshot.debugGroups.length} groups`;
|
|
253
|
+
for (const group of groups) {
|
|
143
254
|
const selection = { kind: 'group', pathKey: group.pathKey };
|
|
144
255
|
const row = document.createElement('tr');
|
|
145
256
|
registerSelectable(this.rows, row, selection, this.callbacks);
|
|
146
|
-
const
|
|
257
|
+
const labelCell = createSelectionCell(group.label, selection, this.callbacks);
|
|
258
|
+
labelCell.style.paddingLeft = `${8 + group.depth * 18}px`;
|
|
259
|
+
labelCell.title = group.path.join(' / ');
|
|
147
260
|
const toggle = document.createElement('button');
|
|
148
261
|
toggle.type = 'button';
|
|
149
262
|
toggle.className = 'zenfg-inspector-group-toggle';
|
|
150
|
-
const expanded = this.
|
|
151
|
-
toggle.textContent = expanded ? '▾' : '▸';
|
|
152
|
-
toggle.
|
|
263
|
+
const expanded = this.groupSearch.length > 0 || !this.collapsedGroups.has(group.pathKey);
|
|
264
|
+
toggle.textContent = parents.has(group.id) ? expanded ? '▾' : '▸' : '·';
|
|
265
|
+
toggle.disabled = !parents.has(group.id) || this.groupSearch.length > 0;
|
|
266
|
+
toggle.title = this.groupSearch ? 'Matching groups and ancestors are expanded while searching.' : 'Toggle this group hierarchy';
|
|
153
267
|
toggle.setAttribute('aria-label', `${expanded ? 'Collapse' : 'Expand'} group ${group.path.join(' / ')}`);
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
268
|
+
if (parents.has(group.id))
|
|
269
|
+
toggle.setAttribute('aria-expanded', String(expanded));
|
|
270
|
+
toggle.addEventListener('click', () => {
|
|
271
|
+
if (expanded)
|
|
272
|
+
this.collapsedGroups.add(group.pathKey);
|
|
273
|
+
else
|
|
274
|
+
this.collapsedGroups.delete(group.pathKey);
|
|
275
|
+
this.renderRows();
|
|
276
|
+
this.rows.get(selectionKey(selection))?.[0]?.querySelector('.zenfg-inspector-group-toggle')?.focus({ preventScroll: true });
|
|
277
|
+
});
|
|
278
|
+
labelCell.prepend(toggle);
|
|
158
279
|
const summary = group.summary;
|
|
159
|
-
|
|
280
|
+
const revealCell = document.createElement('td');
|
|
281
|
+
const reveal = document.createElement('button');
|
|
282
|
+
reveal.type = 'button';
|
|
283
|
+
reveal.className = 'zenfg-inspector-relation-button';
|
|
284
|
+
reveal.textContent = 'Show in Graph';
|
|
285
|
+
reveal.addEventListener('click', () => this.callbacks.onReveal?.(selection, 'graph'));
|
|
286
|
+
revealCell.appendChild(reveal);
|
|
287
|
+
row.append(labelCell, createCell(String(summary.retainedNodeCount), { column: 'numeric' }), createCell(String(summary.culledNodeCount), { column: 'numeric' }), createCell((summary.cpuTimedNodeCount ? (summary.cpuWorkDurationMicros / 1000).toFixed(3) + ' ms' : 'Not collected') + ' · ' + formatTimingCoverage(summary.cpuTimedNodeCount, summary.retainedNodeCount), { column: 'numeric' }), createCell(formatMeasuredGpuWork(summary.gpuWorkDurationMicros, summary.timedNodeCount, summary.timingEligibleNodeCount), { column: 'numeric' }), createCell(String(summary.inputResources.length), { column: 'numeric' }), createCell(String(summary.outputResources.length), { column: 'numeric' }), revealCell);
|
|
160
288
|
this.groupsTable.body.appendChild(row);
|
|
161
289
|
}
|
|
162
|
-
if (
|
|
163
|
-
this.groupsTable.body.appendChild(createEmptyTableRow(
|
|
164
|
-
updateSelectedRows(this.rows, this.selected);
|
|
290
|
+
if (groups.length === 0)
|
|
291
|
+
this.groupsTable.body.appendChild(createEmptyTableRow(8, 'No groups match the current filters.'));
|
|
165
292
|
}
|
|
166
|
-
matchesNode(snapshot,
|
|
293
|
+
matchesNode(snapshot, entry) {
|
|
294
|
+
const { node, selection } = entry;
|
|
295
|
+
if (this.status === 'retained' && selection.kind !== 'node' || this.status === 'culled' && selection.kind !== 'culled')
|
|
296
|
+
return false;
|
|
167
297
|
if (this.kind !== 'all' && node.kind !== this.kind)
|
|
168
298
|
return false;
|
|
169
|
-
|
|
170
|
-
return true;
|
|
171
|
-
const haystack = `${labelNode(node)} ${groupPath(snapshot, node.debugGroupId)}`.toLocaleLowerCase();
|
|
172
|
-
return haystack.includes(this.search);
|
|
299
|
+
return !this.search || `${labelNode(node)} ${node.id} ${groupPath(snapshot, node.debugGroupId)}`.toLocaleLowerCase().includes(this.search);
|
|
173
300
|
}
|
|
174
301
|
compareNodes(a, b) {
|
|
302
|
+
const order = () => a.order === undefined ? b.order === undefined ? a.recordingOrder - b.recordingOrder : 1
|
|
303
|
+
: b.order === undefined ? -1 : a.order - b.order;
|
|
175
304
|
switch (this.sort) {
|
|
176
|
-
case 'label': return labelNode(a).localeCompare(labelNode(b)) ||
|
|
177
|
-
case 'kind': return a.kind.localeCompare(b.kind) ||
|
|
178
|
-
case '
|
|
179
|
-
case '
|
|
305
|
+
case 'label': return labelNode(a.node).localeCompare(labelNode(b.node)) || order();
|
|
306
|
+
case 'kind': return a.node.kind.localeCompare(b.node.kind) || order();
|
|
307
|
+
case 'cpu': return (b.node.cpuDurationMicros ?? -1) - (a.node.cpuDurationMicros ?? -1) || order();
|
|
308
|
+
case 'gpu': return (b.node.gpuDurationMicros ?? -1) - (a.node.gpuDurationMicros ?? -1) || order();
|
|
309
|
+
case 'order': return order();
|
|
180
310
|
}
|
|
181
311
|
}
|
|
182
312
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panelPassesView.js","sourceRoot":"","sources":["../src/panelPassesView.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEhF,OAAO,EACN,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAElB,kBAAkB,GAClB,MAAM,4BAA4B,CAAC;AAIpC,MAAM,OAAO,UAAU;IAmCO;IAlCpB,IAAI,GAAG,QAA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AAI,KAAK,IAAI,CAAC,IAAI;YAAE,OAAO,KAAK,CAAC;QACjE,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QAC1C,MAAM,QAAQ,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,iBAAiB,EAAE,CAAC;QACpG,OAAO,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;IAEO,YAAY,CAAC,CAAsB,EAAE,CAAsB;QAClE,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;YACnB,KAAK,OAAO,CAAC,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;YACnF,KAAK,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;YACtE,KAAK,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,iBAAiB,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,iBAAiB,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;YAClG,KAAK,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;QACxC,CAAC;IACF,CAAC;CACD","sourcesContent":["import type { FrameGraphDebugNode, FrameGraphDebugViewModel } from './debugCaptureModel.ts';\nimport { createCell, formatGpuDuration, labelNode } from './panelDomHelpers.ts';\nimport type { PassesSubview, Selection } from './panelTypes.ts';\nimport {\n\tcreateEmptyTableRow,\n\tcreateKindCell,\n\tcreateFilterSelect,\n\tcreateSearchInput,\n\tcreateSelectionCell,\n\tcreateTableScroller,\n\tcreateViewToolbar,\n\tgroupPath,\n\tregisterSelectable,\n\ttype WorkbenchCallbacks,\n\tupdateSelectedRows,\n} from './panelWorkbenchHelpers.ts';\n\ntype PassSort = 'order' | 'label' | 'kind' | 'gpu';\n\nexport class PassesView {\n\treadonly root = document.createElement('section');\n\tprivate readonly toolbar = createViewToolbar('Pass filters and sorting');\n\tprivate readonly tabList = document.createElement('div');\n\tprivate readonly listButton = this.createSubviewButton('list', 'Pass List');\n\tprivate readonly groupsButton = this.createSubviewButton('groups', 'Group Hierarchy');\n\tprivate readonly listPane = document.createElement('div');\n\tprivate readonly groupsPane = document.createElement('div');\n\tprivate readonly listTable = createTableScroller([\n\t\t{ label: 'Order', column: 'numeric' },\n\t\t{ label: 'Segment', column: 'code' },\n\t\t{ label: 'Label' },\n\t\t{ label: 'Group' },\n\t\t{ label: 'Kind', column: 'kind' },\n\t\t{ label: 'GPU (ms)', column: 'numeric' },\n\t\t{ label: 'Reads', column: 'numeric' },\n\t\t{ label: 'Writes', column: 'numeric' },\n\t]);\n\tprivate readonly groupsTable = createTableScroller([\n\t\t{ label: '' },\n\t\t{ label: 'Group' },\n\t\t{ label: 'Retained', column: 'numeric' },\n\t\t{ label: 'Culled', column: 'numeric' },\n\t\t{ label: 'GPU work', column: 'numeric' },\n\t\t{ label: 'Inputs', column: 'numeric' },\n\t\t{ label: 'Outputs', column: 'numeric' },\n\t]);\n\tprivate readonly rows = new Map<string, HTMLElement[]>();\n\tprivate snapshot: FrameGraphDebugViewModel | undefined;\n\tprivate selected: Selection | undefined;\n\tprivate subview: PassesSubview = 'list';\n\tprivate search = '';\n\tprivate kind = 'all';\n\tprivate sort: PassSort = 'order';\n\n\tconstructor(private readonly callbacks: WorkbenchCallbacks, idPrefix: string) {\n\t\tthis.root.className = 'zenfg-inspector-view zenfg-inspector-passes-view';\n\t\tthis.root.id = `${idPrefix}-view-passes`;\n\t\tthis.root.setAttribute('role', 'tabpanel');\n\t\tthis.tabList.className = 'zenfg-inspector-subtabs';\n\t\tthis.tabList.setAttribute('role', 'tablist');\n\t\tthis.tabList.setAttribute('aria-label', 'Pass views');\n\t\tthis.tabList.append(this.listButton, this.groupsButton);\n\n\t\tconst search = createSearchInput('Search pass or group', this.search, (value) => {\n\t\t\tthis.search = value.trim().toLocaleLowerCase();\n\t\t\tthis.renderRows();\n\t\t});\n\t\tconst kind = createFilterSelect('Pass kind', this.kind, [\n\t\t\t['all', 'All kinds'],\n\t\t\t['render', 'Render'],\n\t\t\t['compute', 'Compute'],\n\t\t\t['copy', 'Copy'],\n\t\t\t['clear-buffer', 'Clear Buffer'],\n\t\t\t['command', 'Command'],\n\t\t\t['external-submission', 'External'],\n\t\t], (value) => {\n\t\t\tthis.kind = value;\n\t\t\tthis.renderRows();\n\t\t});\n\t\tconst sort = createFilterSelect('Sort passes', this.sort, [\n\t\t\t['order', 'Order'],\n\t\t\t['label', 'Label'],\n\t\t\t['kind', 'Kind'],\n\t\t\t['gpu', 'GPU'],\n\t\t], (value) => {\n\t\t\tthis.sort = value as PassSort;\n\t\t\tthis.renderRows();\n\t\t});\n\t\tthis.toolbar.append(search, kind, sort);\n\n\t\tthis.listButton.id = `${idPrefix}-list-subtab`;\n\t\tthis.listButton.setAttribute('aria-controls', `${idPrefix}-pass-list-panel`);\n\t\tthis.groupsButton.id = `${idPrefix}-groups-subtab`;\n\t\tthis.groupsButton.setAttribute('aria-controls', `${idPrefix}-group-list-panel`);\n\t\tthis.listPane.id = `${idPrefix}-pass-list-panel`;\n\t\tthis.listPane.className = 'zenfg-inspector-subview';\n\t\tthis.listPane.setAttribute('role', 'tabpanel');\n\t\tthis.listPane.setAttribute('aria-labelledby', this.listButton.id);\n\t\tthis.listPane.appendChild(this.listTable.scroller);\n\t\tthis.groupsPane.id = `${idPrefix}-group-list-panel`;\n\t\tthis.groupsPane.className = 'zenfg-inspector-subview';\n\t\tthis.groupsPane.setAttribute('role', 'tabpanel');\n\t\tthis.groupsPane.setAttribute('aria-labelledby', this.groupsButton.id);\n\t\tthis.groupsPane.appendChild(this.groupsTable.scroller);\n\t\tthis.root.append(this.tabList, this.toolbar, this.listPane, this.groupsPane);\n\t\tthis.updateSubview();\n\t}\n\n\tsetSnapshot(snapshot: FrameGraphDebugViewModel): void {\n\t\tthis.snapshot = snapshot;\n\t\tif (snapshot.debugGroups.length === 0 && this.subview === 'groups') this.subview = 'list';\n\t\tthis.groupsButton.disabled = snapshot.debugGroups.length === 0;\n\t\tthis.renderRows();\n\t\tthis.updateSubview();\n\t}\n\n\tsetSelection(selected: Selection | undefined): void {\n\t\tthis.selected = selected;\n\t\tupdateSelectedRows(this.rows, selected);\n\t}\n\n\tprivate createSubviewButton(subview: PassesSubview, label: string): HTMLButtonElement {\n\t\tconst button = document.createElement('button');\n\t\tbutton.type = 'button';\n\t\tbutton.textContent = label;\n\t\tbutton.setAttribute('role', 'tab');\n\t\tbutton.addEventListener('click', () => {\n\t\t\tthis.subview = subview;\n\t\t\tthis.updateSubview();\n\t\t});\n\t\treturn button;\n\t}\n\n\tprivate updateSubview(): void {\n\t\tconst listActive = this.subview === 'list';\n\t\tthis.listButton.setAttribute('aria-selected', listActive ? 'true' : 'false');\n\t\tthis.groupsButton.setAttribute('aria-selected', listActive ? 'false' : 'true');\n\t\tthis.listButton.classList.toggle('active', listActive);\n\t\tthis.groupsButton.classList.toggle('active', !listActive);\n\t\tthis.listPane.hidden = !listActive;\n\t\tthis.groupsPane.hidden = listActive;\n\t}\n\n\tprivate renderRows(): void {\n\t\tconst snapshot = this.snapshot;\n\t\tif (!snapshot) return;\n\t\tthis.rows.clear();\n\t\tthis.listTable.body.replaceChildren();\n\t\tthis.groupsTable.body.replaceChildren();\n\n\t\tconst passes = snapshot.nodes.filter((node) => this.matchesNode(snapshot, node));\n\t\tpasses.sort((a, b) => this.compareNodes(a, b));\n\t\tfor (const node of passes) {\n\t\t\tconst selection: Selection = { kind: 'node', id: node.id };\n\t\t\tconst row = document.createElement('tr');\n\t\t\tregisterSelectable(this.rows, row, selection, this.callbacks);\n\t\t\tconst segment = snapshot.segmentByNodeId.get(node.id);\n\t\t\trow.append(\n\t\t\t\tcreateCell(String(node.order), { column: 'numeric' }),\n\t\t\t\tcreateCell(segment ? `${segment.index}:${segment.kind === 'frame-graph' ? 'FG' : 'opaque'}` : '-', { column: 'code' }),\n\t\t\t\tcreateSelectionCell(labelNode(node), selection, this.callbacks),\n\t\t\t\tcreateCell(groupPath(snapshot, node.debugGroupId), { column: 'code' }),\n\t\t\t\tcreateKindCell(node.kind),\n\t\t\t\tcreateCell(node.kind === 'external-submission' ? 'opaque' : formatGpuDuration(node), { column: 'numeric' }),\n\t\t\t\tcreateCell(String(node.reads.length), { column: 'numeric' }),\n\t\t\t\tcreateCell(String(node.writes.length), { column: 'numeric' }),\n\t\t\t);\n\t\t\tthis.listTable.body.appendChild(row);\n\t\t}\n\t\tif (passes.length === 0) this.listTable.body.appendChild(createEmptyTableRow(8, 'No passes match the current filters.'));\n\n\t\tconst query = this.search;\n\t\tfor (const group of snapshot.debugGroups.filter((candidate) => (\n\t\t\tquery.length === 0 || candidate.path.join(' / ').toLocaleLowerCase().includes(query)\n\t\t))) {\n\t\t\tconst selection: Selection = { kind: 'group', pathKey: group.pathKey };\n\t\t\tconst row = document.createElement('tr');\n\t\t\tregisterSelectable(this.rows, row, selection, this.callbacks);\n\t\t\tconst toggleCell = document.createElement('td');\n\t\t\tconst toggle = document.createElement('button');\n\t\t\ttoggle.type = 'button';\n\t\t\ttoggle.className = 'zenfg-inspector-group-toggle';\n\t\t\tconst expanded = this.callbacks.isGroupExpanded(group.pathKey);\n\t\t\ttoggle.textContent = expanded ? '▾' : '▸';\n\t\t\ttoggle.title = 'Toggle group in Graph view';\n\t\t\ttoggle.setAttribute('aria-label', `${expanded ? 'Collapse' : 'Expand'} group ${group.path.join(' / ')}`);\n\t\t\ttoggle.addEventListener('click', () => this.callbacks.onGroupToggle(group.pathKey));\n\t\t\ttoggleCell.appendChild(toggle);\n\t\t\tconst labelCell = createSelectionCell(group.label, selection, this.callbacks);\n\t\t\tlabelCell.style.paddingLeft = `${8 + group.depth * 18}px`;\n\t\t\tconst summary = group.summary;\n\t\t\trow.append(\n\t\t\t\ttoggleCell,\n\t\t\t\tlabelCell,\n\t\t\t\tcreateCell(String(summary.retainedNodeCount), { column: 'numeric' }),\n\t\t\t\tcreateCell(String(summary.culledNodeCount), { column: 'numeric' }),\n\t\t\t\tcreateCell(summary.timedNodeCount === 0 ? '-' : (summary.gpuWorkDurationMicros / 1000).toFixed(3), { column: 'numeric' }),\n\t\t\t\tcreateCell(String(summary.inputResources.length), { column: 'numeric' }),\n\t\t\t\tcreateCell(String(summary.outputResources.length), { column: 'numeric' }),\r\n\t\t\t);\n\t\t\tthis.groupsTable.body.appendChild(row);\n\t\t}\n\t\tif (this.groupsTable.body.childElementCount === 0) this.groupsTable.body.appendChild(createEmptyTableRow(7, 'No diagnostic groups.'));\n\t\tupdateSelectedRows(this.rows, this.selected);\n\t}\n\n\tprivate matchesNode(snapshot: FrameGraphDebugViewModel, node: FrameGraphDebugNode): boolean {\n\t\tif (this.kind !== 'all' && node.kind !== this.kind) return false;\n\t\tif (this.search.length === 0) return true;\n\t\tconst haystack = `${labelNode(node)} ${groupPath(snapshot, node.debugGroupId)}`.toLocaleLowerCase();\n\t\treturn haystack.includes(this.search);\n\t}\n\n\tprivate compareNodes(a: FrameGraphDebugNode, b: FrameGraphDebugNode): number {\n\t\tswitch (this.sort) {\n\t\t\tcase 'label': return labelNode(a).localeCompare(labelNode(b)) || a.order - b.order;\n\t\t\tcase 'kind': return a.kind.localeCompare(b.kind) || a.order - b.order;\n\t\t\tcase 'gpu': return (b.gpuDurationMicros ?? -1) - (a.gpuDurationMicros ?? -1) || a.order - b.order;\n\t\t\tcase 'order': return a.order - b.order;\n\t\t}\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"panelPassesView.js","s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AC,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,GAAG,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;YAC1G,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;QAClD,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;YACnB,KAAK,OAAO,CAAC,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC;YACnF,KAAK,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC;YACtE,KAAK,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC;YAClG,KAAK,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC;YAClG,KAAK,OAAO,CAAC,CAAC,OAAO,KAAK,EAAE,CAAC;QAC9B,CAAC;IACF,CAAC;CACD","sourcesContent":["import type { FrameGraphDebugGroup, FrameGraphDebugNode, FrameGraphDebugViewModel } from './debugCaptureModel.ts';\nimport { createCell, labelNode } from './panelDomHelpers.ts';\nimport type { PassesSubview, Selection } from './panelTypes.ts';\nimport {\n\tcreateEmptyTableRow, createKindCell, createFilterSelect, createSearchInput, createSelectionCell,\n\tcreateTableScroller, createViewToolbar, enableTabKeyboard, formatMeasuredGpuWork, formatTimingCoverage,\n\tgroupPath, registerSelectable, selectionKey, type WorkbenchCallbacks, updateSelectedRows,\n} from './panelWorkbenchHelpers.ts';\n\ntype PassSort = 'order' | 'label' | 'kind' | 'gpu' | 'cpu';\ntype PassEntry = {\n\treadonly node: Omit<FrameGraphDebugNode, 'order'>;\n\treadonly selection: Selection;\n\treadonly order?: number;\n\treadonly recordingOrder: number;\n};\n\nexport class PassesView {\n\treadonly root = document.createElement('section');\n\tprivate readonly toolbar = createViewToolbar('Pass filters and sorting');\n\tprivate readonly groupToolbar = createViewToolbar('Group search');\n\tprivate readonly tabList = document.createElement('div');\n\tprivate readonly listButton = this.createSubviewButton('list', 'Pass List');\n\tprivate readonly groupsButton = this.createSubviewButton('groups', 'Group Hierarchy');\n\tprivate readonly listPane = document.createElement('div');\n\tprivate readonly groupsPane = document.createElement('div');\n\tprivate readonly listTable = createTableScroller([\n\t\t{ label: 'Name' }, { label: 'Compile state', column: 'kind' }, { label: 'Order', column: 'numeric' },\n\t\t{ label: 'Kind', column: 'kind' }, { label: 'CPU (ms)', column: 'numeric' }, { label: 'GPU (ms)', column: 'numeric' }, { label: 'R / W', column: 'numeric' },\n\t]);\n\tprivate readonly groupsTable = createTableScroller([\n\t\t{ label: 'Group' }, { label: 'Retained', column: 'numeric' }, { label: 'Culled', column: 'numeric' },\n\t\t{ label: 'CPU sum / coverage', column: 'numeric' }, { label: 'GPU pass sum', column: 'numeric' }, { label: 'Inputs', column: 'numeric' },\n\t\t{ label: 'Outputs', column: 'numeric' }, { label: 'Locate' },\n\t]);\n\tprivate readonly rows = new Map<string, HTMLElement[]>();\n\tprivate readonly collapsedGroups = new Set<string>();\n\tprivate readonly count = document.createElement('span');\n\tprivate readonly groupCount = document.createElement('span');\n\tprivate readonly timing = document.createElement('p');\n\tprivate readonly searchInput: HTMLInputElement;\n\tprivate readonly groupSearchInput: HTMLInputElement;\n\tprivate readonly kindSelect: HTMLSelectElement;\n\tprivate readonly statusSelect: HTMLSelectElement;\n\tprivate snapshot: FrameGraphDebugViewModel | undefined;\n\tprivate selected: Selection | undefined;\n\tprivate subview: PassesSubview = 'list';\n\tprivate search = '';\n\tprivate groupSearch = '';\n\tprivate kind = 'all';\n\tprivate status = 'all';\n\tprivate sort: PassSort = 'order';\n\n\tconstructor(private readonly callbacks: WorkbenchCallbacks, idPrefix: string) {\n\t\tthis.root.className = 'zenfg-inspector-view zenfg-inspector-passes-view';\n\t\tthis.root.id = `${idPrefix}-view-passes`;\n\t\tthis.root.setAttribute('role', 'tabpanel');\n\t\tthis.tabList.className = 'zenfg-inspector-subtabs';\n\t\tthis.tabList.setAttribute('role', 'tablist');\n\t\tthis.tabList.setAttribute('aria-label', 'Pass views');\n\t\tthis.tabList.append(this.listButton, this.groupsButton);\n\t\tenableTabKeyboard(this.tabList);\n\t\tthis.searchInput = createSearchInput('Search pass, ID or group', '', (value) => {\n\t\t\tthis.search = value.trim().toLocaleLowerCase(); this.renderRows();\n\t\t});\n\t\tthis.statusSelect = createFilterSelect('Pass compile state', this.status, [\n\t\t\t['all', 'All'], ['retained', 'Retained'], ['culled', 'Culled'],\n\t\t], (value) => { this.status = value; this.renderRows(); });\n\t\tthis.kindSelect = createFilterSelect('Pass kind', this.kind, [\n\t\t\t['all', 'All kinds'], ['render', 'Render'], ['compute', 'Compute'], ['copy', 'Copy'],\n\t\t\t['clear-buffer', 'Clear Buffer'], ['command', 'Command'], ['external-submission', 'External'],\n\t\t], (value) => { this.kind = value; this.renderRows(); });\n\t\tconst sort = createFilterSelect('Sort passes', this.sort, [\n\t\t\t['order', 'Execution order'], ['label', 'Name'], ['kind', 'Kind'], ['gpu', 'GPU: slowest first'], ['cpu', 'CPU: slowest first'],\n\t\t], (value) => { this.sort = value as PassSort; this.renderRows(); });\n\t\tconst clear = document.createElement('button');\n\t\tclear.type = 'button'; clear.textContent = 'Clear filters';\n\t\tclear.addEventListener('click', () => { this.clearFilters(); this.renderRows(); });\n\t\tthis.count.className = 'zenfg-inspector-result-count'; this.count.setAttribute('role', 'status');\n\t\tthis.toolbar.append(this.searchInput, this.statusSelect, this.kindSelect, sort, clear, this.count);\n\t\tthis.groupSearchInput = createSearchInput('Search group path or ID', '', (value) => {\n\t\t\tthis.groupSearch = value.trim().toLocaleLowerCase(); this.renderRows();\n\t\t});\n\t\tconst clearGroups = document.createElement('button');\n\t\tclearGroups.type = 'button'; clearGroups.textContent = 'Clear filters';\n\t\tclearGroups.addEventListener('click', () => {\n\t\t\tthis.groupSearch = ''; this.groupSearchInput.value = ''; this.renderRows();\n\t\t});\n\t\tthis.groupCount.className = 'zenfg-inspector-result-count'; this.groupCount.setAttribute('role', 'status');\n\t\tthis.groupToolbar.append(this.groupSearchInput, clearGroups, this.groupCount);\n\t\tthis.timing.className = 'zenfg-inspector-list-context';\n\t\tthis.listButton.id = `${idPrefix}-list-subtab`;\n\t\tthis.listButton.setAttribute('aria-controls', `${idPrefix}-pass-list-panel`);\n\t\tthis.groupsButton.id = `${idPrefix}-groups-subtab`;\n\t\tthis.groupsButton.setAttribute('aria-controls', `${idPrefix}-group-list-panel`);\n\t\tthis.listPane.id = `${idPrefix}-pass-list-panel`; this.listPane.className = 'zenfg-inspector-subview';\n\t\tthis.listPane.setAttribute('role', 'tabpanel'); this.listPane.setAttribute('aria-labelledby', this.listButton.id);\n\t\tthis.listPane.appendChild(this.listTable.scroller);\n\t\tthis.groupsPane.id = `${idPrefix}-group-list-panel`; this.groupsPane.className = 'zenfg-inspector-subview';\n\t\tthis.groupsPane.setAttribute('role', 'tabpanel'); this.groupsPane.setAttribute('aria-labelledby', this.groupsButton.id);\n\t\tthis.groupsPane.appendChild(this.groupsTable.scroller);\n\t\tthis.root.append(this.tabList, this.toolbar, this.groupToolbar, this.timing, this.listPane, this.groupsPane);\n\t\tthis.updateSubview();\n\t}\n\n\tsetSnapshot(snapshot: FrameGraphDebugViewModel): void {\n\t\tthis.snapshot = snapshot;\n\t\tif (snapshot.debugGroups.length === 0 && this.subview === 'groups') this.subview = 'list';\n\t\tthis.groupsButton.disabled = snapshot.debugGroups.length === 0;\n\t\tfor (const path of this.collapsedGroups) if (!snapshot.groupByPathKey.has(path)) this.collapsedGroups.delete(path);\n\t\tthis.renderRows(); this.updateSubview();\n\t}\n\n\tsetSelection(selected: Selection | undefined): void {\n\t\tthis.selected = selected; updateSelectedRows(this.rows, selected);\n\t}\n\n\tshowCulled(): void {\n\t\tthis.clearFilters(); this.status = 'culled'; this.statusSelect.value = 'culled'; this.subview = 'list';\n\t\tthis.updateSubview(); this.renderRows();\n\t}\n\n\treveal(selection: Selection): void {\n\t\tif (selection.kind === 'group') {\n\t\t\tthis.subview = 'groups'; this.groupSearch = ''; this.groupSearchInput.value = '';\n\t\t\tconst group = this.snapshot?.groupByPathKey.get(selection.pathKey);\n\t\t\tfor (const id of group?.ancestorIds ?? []) {\n\t\t\t\tconst ancestor = this.snapshot?.groupById.get(id);\n\t\t\t\tif (ancestor) this.collapsedGroups.delete(ancestor.pathKey);\n\t\t\t}\n\t\t} else if (selection.kind === 'node' || selection.kind === 'culled') {\n\t\t\tthis.subview = 'list'; this.clearFilters();\n\t\t} else return;\n\t\tthis.updateSubview(); this.renderRows();\n\t\tthis.rows.get(selectionKey(selection))?.[0]?.scrollIntoView?.({ block: 'nearest' });\n\t}\n\n\tprivate clearFilters(): void {\n\t\tthis.search = ''; this.kind = 'all'; this.status = 'all';\n\t\tthis.searchInput.value = ''; this.kindSelect.value = 'all'; this.statusSelect.value = 'all';\n\t}\n\n\tprivate createSubviewButton(subview: PassesSubview, label: string): HTMLButtonElement {\n\t\tconst button = document.createElement('button'); button.type = 'button'; button.textContent = label;\n\t\tbutton.setAttribute('role', 'tab');\n\t\tbutton.addEventListener('click', () => { this.subview = subview; this.updateSubview(); });\n\t\treturn button;\n\t}\n\n\tprivate updateSubview(): void {\n\t\tconst listActive = this.subview === 'list';\n\t\tthis.listButton.setAttribute('aria-selected', String(listActive));\n\t\tthis.groupsButton.setAttribute('aria-selected', String(!listActive));\n\t\tthis.listButton.tabIndex = listActive ? 0 : -1; this.groupsButton.tabIndex = listActive ? -1 : 0;\n\t\tthis.listButton.classList.toggle('active', listActive); this.groupsButton.classList.toggle('active', !listActive);\n\t\tthis.listPane.hidden = !listActive; this.groupsPane.hidden = listActive;\n\t\tthis.toolbar.hidden = !listActive; this.groupToolbar.hidden = listActive; this.timing.hidden = !listActive;\n\t}\n\n\tprivate renderRows(): void {\n\t\tconst snapshot = this.snapshot;\n\t\tif (!snapshot) return;\n\t\tthis.rows.clear(); this.listTable.body.replaceChildren(); this.groupsTable.body.replaceChildren();\n\t\tconst entries = snapshot.protocol.graph.nodes.flatMap((canonical, index): PassEntry[] => {\n\t\t\tconst node = snapshot.nodeById.get(canonical.id) ?? snapshot.culledById.get(canonical.id)?.node;\n\t\t\tif (!node) return [];\n\t\t\treturn [{ node,\n\t\t\t\tselection: { kind: canonical.compileState.status === 'retained' ? 'node' : 'culled', id: node.id },\n\t\t\t\torder: canonical.compileState.status === 'retained' ? canonical.compileState.executionOrder : undefined,\n\t\t\t\trecordingOrder: canonical.recordingOrder ?? index,\n\t\t\t}];\n\t\t});\n\t\tconst passes = entries.filter((entry) => this.matchesNode(snapshot, entry));\n\t\tpasses.sort((a, b) => this.compareNodes(a, b)); this.count.textContent = `${passes.length} / ${entries.length} passes`;\n\t\tconst metrics = snapshot.metrics;\n\t\tthis.timing.textContent = `Retained means kept by compilation. CPU timing: ${formatTimingCoverage(metrics.cpuTimedNodeCount, snapshot.nodes.length)}. GPU timing: ${formatTimingCoverage(metrics.timedNodeCount, metrics.timingEligibleNodeCount)}${snapshot.profiling.status === 'unavailable' ? ` (${snapshot.profiling.reason})` : ''}.`;\n\t\tfor (const { node, selection, order } of passes) {\n\t\t\tconst row = document.createElement('tr'); registerSelectable(this.rows, row, selection, this.callbacks);\n\t\t\tconst labelCell = createSelectionCell(labelNode(node), selection, this.callbacks); labelCell.title = node.id;\n\t\t\tif (node.debugGroupId !== undefined) {\n\t\t\t\tconst group = document.createElement('small'); group.textContent = groupPath(snapshot, node.debugGroupId); labelCell.appendChild(group);\n\t\t\t}\n\t\t\tconst stateCell = createKindCell(selection.kind === 'culled' ? 'culled' : 'retained', selection.kind === 'culled' ? 'Culled' : 'Retained');\n\t\t\tstateCell.title = selection.kind === 'culled' ? snapshot.culledById.get(node.id)?.reason ?? '' : 'Kept by compilation; this does not prove GPU execution.';\n\t\t\tconst gpu = selection.kind === 'culled' ? 'Not applicable' : node.kind === 'external-submission' ? 'Opaque'\n\t\t\t\t: node.gpuDurationMicros !== undefined ? (node.gpuDurationMicros / 1000).toFixed(3)\n\t\t\t\t\t: node.kind === 'render' || node.kind === 'compute' ? 'Not collected' : 'Not applicable';\n\t\t\tconst cpu = selection.kind === 'culled' ? 'Not executed' : node.cpuDurationMicros === undefined ? 'Not collected' : (node.cpuDurationMicros / 1000).toFixed(3);\n\t\t\tconst cpuCell = createCell(cpu, { column: 'numeric' });\n\t\t\tcpuCell.title = 'Synchronous elapsed time; zero may reflect clock precision. External nodes include synchronous submission.';\n\t\t\trow.append(labelCell, stateCell, createCell(order === undefined ? 'Not applicable' : String(order), { column: 'numeric' }),\n\t\t\t\tcreateKindCell(node.kind), cpuCell, createCell(gpu, { column: 'numeric' }), createCell(`${node.reads.length} / ${node.writes.length}`, { column: 'numeric' }));\n\t\t\tthis.listTable.body.appendChild(row);\n\t\t}\n\t\tif (passes.length === 0) this.listTable.body.appendChild(createEmptyTableRow(7, 'No passes match the current filters.'));\n\t\tthis.renderGroups(snapshot); updateSelectedRows(this.rows, this.selected);\n\t}\n\n\tprivate renderGroups(snapshot: FrameGraphDebugViewModel): void {\n\t\tconst included = new Set<string>();\n\t\tconst childrenByParent = new Map<string | undefined, FrameGraphDebugGroup[]>();\n\t\tfor (const group of snapshot.debugGroups) {\n\t\t\tconst siblings = childrenByParent.get(group.parentId) ?? [];\n\t\t\tsiblings.push(group);\n\t\t\tchildrenByParent.set(group.parentId, siblings);\n\t\t}\n\t\t// Parent-before-child capture order need not be depth-first; keep each subtree together.\n\t\tconst orderedGroups: FrameGraphDebugGroup[] = [];\n\t\tconst pending = [...(childrenByParent.get(undefined) ?? [])].reverse();\n\t\twhile (pending.length) {\n\t\t\tconst group = pending.pop()!;\n\t\t\torderedGroups.push(group);\n\t\t\tpending.push(...[...(childrenByParent.get(group.id) ?? [])].reverse());\n\t\t}\n\t\tconst parents = new Set(childrenByParent.keys());\n\t\tif (this.groupSearch) for (const group of snapshot.debugGroups) {\n\t\t\tif (`${group.path.join(' / ')} ${group.id}`.toLocaleLowerCase().includes(this.groupSearch)) {\n\t\t\t\tfor (const id of group.ancestorIds) included.add(id);\n\t\t\t}\n\t\t}\n\t\tconst groups = orderedGroups.filter((group) => this.groupSearch ? included.has(group.id)\n\t\t\t: !group.ancestorIds.slice(0, -1).some((id) => this.collapsedGroups.has(snapshot.groupById.get(id)!.pathKey)));\n\t\tthis.groupCount.textContent = `${groups.length} / ${snapshot.debugGroups.length} groups`;\n\t\tfor (const group of groups) {\n\t\t\tconst selection: Selection = { kind: 'group', pathKey: group.pathKey };\n\t\t\tconst row = document.createElement('tr'); registerSelectable(this.rows, row, selection, this.callbacks);\n\t\t\tconst labelCell = createSelectionCell(group.label, selection, this.callbacks);\n\t\t\tlabelCell.style.paddingLeft = `${8 + group.depth * 18}px`; labelCell.title = group.path.join(' / ');\n\t\t\tconst toggle = document.createElement('button'); toggle.type = 'button'; toggle.className = 'zenfg-inspector-group-toggle';\n\t\t\tconst expanded = this.groupSearch.length > 0 || !this.collapsedGroups.has(group.pathKey);\n\t\t\ttoggle.textContent = parents.has(group.id) ? expanded ? '▾' : '▸' : '·';\n\t\t\ttoggle.disabled = !parents.has(group.id) || this.groupSearch.length > 0;\n\t\t\ttoggle.title = this.groupSearch ? 'Matching groups and ancestors are expanded while searching.' : 'Toggle this group hierarchy';\n\t\t\ttoggle.setAttribute('aria-label', `${expanded ? 'Collapse' : 'Expand'} group ${group.path.join(' / ')}`);\n\t\t\tif (parents.has(group.id)) toggle.setAttribute('aria-expanded', String(expanded));\n\t\t\ttoggle.addEventListener('click', () => {\n\t\t\t\tif (expanded) this.collapsedGroups.add(group.pathKey); else this.collapsedGroups.delete(group.pathKey);\n\t\t\t\tthis.renderRows();\n\t\t\t\tthis.rows.get(selectionKey(selection))?.[0]?.querySelector<HTMLButtonElement>('.zenfg-inspector-group-toggle')?.focus({ preventScroll: true });\n\t\t\t});\n\t\t\tlabelCell.prepend(toggle);\n\t\t\tconst summary = group.summary;\n\t\t\tconst revealCell = document.createElement('td'); const reveal = document.createElement('button');\n\t\t\treveal.type = 'button'; reveal.className = 'zenfg-inspector-relation-button'; reveal.textContent = 'Show in Graph';\n\t\t\treveal.addEventListener('click', () => this.callbacks.onReveal?.(selection, 'graph')); revealCell.appendChild(reveal);\n\t\t\trow.append(labelCell, createCell(String(summary.retainedNodeCount), { column: 'numeric' }),\n\t\t\t\tcreateCell(String(summary.culledNodeCount), { column: 'numeric' }),\n\t\t\t\tcreateCell((summary.cpuTimedNodeCount ? (summary.cpuWorkDurationMicros / 1000).toFixed(3) + ' ms' : 'Not collected') + ' · ' + formatTimingCoverage(summary.cpuTimedNodeCount, summary.retainedNodeCount), { column: 'numeric' }),\n\t\t\t\tcreateCell(formatMeasuredGpuWork(summary.gpuWorkDurationMicros, summary.timedNodeCount, summary.timingEligibleNodeCount), { column: 'numeric' }),\n\t\t\t\tcreateCell(String(summary.inputResources.length), { column: 'numeric' }),\n\t\t\t\tcreateCell(String(summary.outputResources.length), { column: 'numeric' }), revealCell);\n\t\t\tthis.groupsTable.body.appendChild(row);\n\t\t}\n\t\tif (groups.length === 0) this.groupsTable.body.appendChild(createEmptyTableRow(8, 'No groups match the current filters.'));\n\t}\n\n\tprivate matchesNode(snapshot: FrameGraphDebugViewModel, entry: PassEntry): boolean {\n\t\tconst { node, selection } = entry;\n\t\tif (this.status === 'retained' && selection.kind !== 'node' || this.status === 'culled' && selection.kind !== 'culled') return false;\n\t\tif (this.kind !== 'all' && node.kind !== this.kind) return false;\n\t\treturn !this.search || `${labelNode(node)} ${node.id} ${groupPath(snapshot, node.debugGroupId)}`.toLocaleLowerCase().includes(this.search);\n\t}\n\n\tprivate compareNodes(a: PassEntry, b: PassEntry): number {\n\t\tconst order = () => a.order === undefined ? b.order === undefined ? a.recordingOrder - b.recordingOrder : 1\n\t\t\t: b.order === undefined ? -1 : a.order - b.order;\n\t\tswitch (this.sort) {\n\t\t\tcase 'label': return labelNode(a.node).localeCompare(labelNode(b.node)) || order();\n\t\t\tcase 'kind': return a.node.kind.localeCompare(b.node.kind) || order();\n\t\t\tcase 'cpu': return (b.node.cpuDurationMicros ?? -1) - (a.node.cpuDurationMicros ?? -1) || order();\n\t\t\tcase 'gpu': return (b.node.gpuDurationMicros ?? -1) - (a.node.gpuDurationMicros ?? -1) || order();\n\t\t\tcase 'order': return order();\n\t\t}\n\t}\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SelectedCanonicalDetail } from './panelSelection.ts';
|
|
2
|
+
/** Created only when Raw is visited and retained for the current object/capture. */
|
|
3
|
+
export declare class RawDetailView {
|
|
4
|
+
private readonly detail;
|
|
5
|
+
readonly root: HTMLDivElement;
|
|
6
|
+
private readonly tree;
|
|
7
|
+
private readonly status;
|
|
8
|
+
private readonly expanded;
|
|
9
|
+
private query;
|
|
10
|
+
private readonly json;
|
|
11
|
+
constructor(detail: SelectedCanonicalDetail, migrated: boolean);
|
|
12
|
+
private renderTree;
|
|
13
|
+
private createValue;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=panelRawView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panelRawView.d.ts","sourceRoot":"","sources":["../src/panelRawView.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAGnE,oFAAoF;AACpF,qBAAa,aAAa;IAQb,OAAO,CAAC,QAAQ,CAAC,MAAM;IAPnC,QAAQ,CAAC,IAAI,iBAAiC;IAC9C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAiC;IACtD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkC;IACzD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA0B;IACnD,OAAO,CAAC,KAAK,CAAM;IACnB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;gBAED,MAAM,EAAE,uBAAuB,EAAE,QAAQ,EAAE,OAAO;IA+C/E,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,WAAW;CAgCnB"}
|