stats-gl 2.2.7 → 2.3.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/README.md +8 -7
- package/dist/main.cjs +187 -140
- package/dist/main.cjs.map +1 -1
- package/dist/main.js +187 -140
- package/dist/main.js.map +1 -1
- package/dist/panel.cjs +2 -1
- package/dist/panel.cjs.map +1 -1
- package/dist/panel.js +1 -1
- package/dist/panel.js.map +1 -1
- package/dist/stats-gl.d.ts +60 -56
- package/lib/main.ts +263 -240
- package/lib/panel.ts +3 -3
- package/package.json +15 -9
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
[](https://www.npmjs.com/package/stats-gl)
|
|
3
3
|
[](https://www.npmjs.com/package/stats-gl)
|
|
4
4
|
|
|
5
|
-
WebGL Performance Monitor tool.
|
|
5
|
+
WebGL/WebGPU Performance Monitor tool.
|
|
6
6
|
|
|
7
7
|
🔗 [Live Demo](https://stats.renaudrohlinger.com/)
|
|
8
8
|
|
|
@@ -10,11 +10,11 @@ WebGL Performance Monitor tool.
|
|
|
10
10
|
https://github.com/RenaudRohlinger/stats-gl/assets/15867665/3fdafff4-1357-4872-9baf-0629dbaf9d8c
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
### ❗📢 Note:
|
|
13
|
+
### ❗📢 Note: To support GPU monitoring on Safari you need to enable Timer Queries under WebKit Feature Flags > WebGL Timer Queries
|
|
14
14
|
|
|
15
15
|
## 📚 Description
|
|
16
16
|
|
|
17
|
-
`stats-gl` is a comprehensive tool to monitor WebGL performance. The Stats class provides methods to create performance panels, log performance metrics, and manage the display and layout of these panels. The performance metrics logged include FPS, CPU, and GPU. The GPU logging is available only if the user's browser supports the WebGL 2.0 `EXT_disjoint_timer_query_webgl2` extension.
|
|
17
|
+
`stats-gl` is a comprehensive tool to monitor WebGL performance. The Stats class provides methods to create performance panels, log performance metrics, and manage the display and layout of these panels. The performance metrics logged include FPS, CPU, and GPU. The GPU logging is available only if the user's browser supports the WebGL 2.0 `EXT_disjoint_timer_query_webgl2` extension or WebGPU Timestamp Queries.
|
|
18
18
|
|
|
19
19
|
In addition to logging real-time performance data, the class also provides methods to calculate and display average performance metrics over a specified interval.
|
|
20
20
|
|
|
@@ -34,13 +34,14 @@ import Stats from "stats-gl";
|
|
|
34
34
|
|
|
35
35
|
// create a new Stats object
|
|
36
36
|
const stats = new Stats({
|
|
37
|
-
|
|
37
|
+
trackGPU: false,
|
|
38
|
+
logsPerSecond: 20,
|
|
38
39
|
samplesLog: 100,
|
|
39
40
|
samplesGraph: 10,
|
|
40
41
|
precision: 2,
|
|
41
42
|
horizontal: true,
|
|
42
43
|
minimal: false,
|
|
43
|
-
mode: 0
|
|
44
|
+
mode: 0
|
|
44
45
|
});
|
|
45
46
|
|
|
46
47
|
// append the stats container to the body of the document
|
|
@@ -73,7 +74,7 @@ const container = document.getElementById( 'container' );
|
|
|
73
74
|
const stats = new Stats();
|
|
74
75
|
container.appendChild( stats.dom );
|
|
75
76
|
|
|
76
|
-
const renderer = new THREE.WebGLRenderer( { antialias: true } );
|
|
77
|
+
const renderer = new THREE.WebGLRenderer( { antialias: true } ); // or WebGPURenderer
|
|
77
78
|
container.appendChild( renderer.domElement );
|
|
78
79
|
|
|
79
80
|
const scene = new THREE.Scene();
|
|
@@ -84,7 +85,7 @@ function animate() {
|
|
|
84
85
|
|
|
85
86
|
requestAnimationFrame( animate );
|
|
86
87
|
|
|
87
|
-
render();
|
|
88
|
+
render(); // needs async methods in WebGPU (renderAsync)
|
|
88
89
|
stats.update();
|
|
89
90
|
|
|
90
91
|
}
|
package/dist/main.cjs
CHANGED
|
@@ -1,144 +1,149 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const panel = require("./panel.cjs");
|
|
3
3
|
const _Stats = class _Stats2 {
|
|
4
|
-
constructor({
|
|
4
|
+
constructor({
|
|
5
|
+
trackGPU = false,
|
|
6
|
+
logsPerSecond = 20,
|
|
7
|
+
samplesLog = 100,
|
|
8
|
+
samplesGraph = 10,
|
|
9
|
+
precision = 2,
|
|
10
|
+
minimal = false,
|
|
11
|
+
horizontal = true,
|
|
12
|
+
mode = 0
|
|
13
|
+
} = {}) {
|
|
14
|
+
this.gl = null;
|
|
15
|
+
this.ext = null;
|
|
16
|
+
this.activeQuery = null;
|
|
17
|
+
this.gpuQueries = [];
|
|
18
|
+
this.threeRendererPatched = false;
|
|
19
|
+
this.frames = 0;
|
|
20
|
+
this.renderCount = 0;
|
|
21
|
+
this.isRunningCPUProfiling = false;
|
|
5
22
|
this.totalCpuDuration = 0;
|
|
6
23
|
this.totalGpuDuration = 0;
|
|
7
24
|
this.totalGpuDurationCompute = 0;
|
|
8
25
|
this.totalFps = 0;
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
26
|
+
this.gpuPanel = null;
|
|
27
|
+
this.gpuPanelCompute = null;
|
|
28
|
+
this.averageCpu = { logs: [], graph: [] };
|
|
29
|
+
this.averageGpu = { logs: [], graph: [] };
|
|
30
|
+
this.averageGpuCompute = { logs: [], graph: [] };
|
|
31
|
+
this.handleClick = (event) => {
|
|
32
|
+
event.preventDefault();
|
|
33
|
+
this.showPanel(++this.mode % this.dom.children.length);
|
|
34
|
+
};
|
|
35
|
+
this.handleResize = () => {
|
|
36
|
+
this.resizePanel(this.fpsPanel, 0);
|
|
37
|
+
this.resizePanel(this.msPanel, 1);
|
|
38
|
+
if (this.gpuPanel)
|
|
39
|
+
this.resizePanel(this.gpuPanel, 2);
|
|
40
|
+
if (this.gpuPanelCompute)
|
|
41
|
+
this.resizePanel(this.gpuPanelCompute, 3);
|
|
42
|
+
};
|
|
12
43
|
this.mode = mode;
|
|
13
44
|
this.horizontal = horizontal;
|
|
14
|
-
this.dom = document.createElement("div");
|
|
15
|
-
this.dom.style.cssText = "position:fixed;top:0;left:0;opacity:0.9;z-index:10000;";
|
|
16
|
-
if (minimal) {
|
|
17
|
-
this.dom.style.cssText += "cursor:pointer";
|
|
18
|
-
}
|
|
19
|
-
this.gl = null;
|
|
20
|
-
this.query = null;
|
|
21
|
-
this.isRunningCPUProfiling = false;
|
|
22
45
|
this.minimal = minimal;
|
|
23
|
-
this.
|
|
24
|
-
|
|
25
|
-
this.prevCpuTime = this.beginTime;
|
|
26
|
-
this.frames = 0;
|
|
27
|
-
this.renderCount = 0;
|
|
28
|
-
this.threeRendererPatched = false;
|
|
29
|
-
this.averageCpu = {
|
|
30
|
-
logs: [],
|
|
31
|
-
graph: []
|
|
32
|
-
};
|
|
33
|
-
this.averageGpu = {
|
|
34
|
-
logs: [],
|
|
35
|
-
graph: []
|
|
36
|
-
};
|
|
37
|
-
this.averageGpuCompute = {
|
|
38
|
-
logs: [],
|
|
39
|
-
graph: []
|
|
40
|
-
};
|
|
41
|
-
this.queryCreated = false;
|
|
42
|
-
this.fpsPanel = this.addPanel(new _Stats2.Panel("FPS", "#0ff", "#002"), 0);
|
|
43
|
-
this.msPanel = this.addPanel(new _Stats2.Panel("CPU", "#0f0", "#020"), 1);
|
|
44
|
-
this.gpuPanel = null;
|
|
45
|
-
this.gpuPanelCompute = null;
|
|
46
|
+
this.trackGPU = trackGPU;
|
|
47
|
+
console.log("trackGPU", trackGPU);
|
|
46
48
|
this.samplesLog = samplesLog;
|
|
47
49
|
this.samplesGraph = samplesGraph;
|
|
48
50
|
this.precision = precision;
|
|
49
51
|
this.logsPerSecond = logsPerSecond;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
window.addEventListener("resize", () => {
|
|
59
|
-
this.resizePanel(this.fpsPanel, 0);
|
|
60
|
-
this.resizePanel(this.msPanel, 1);
|
|
61
|
-
if (this.gpuPanel) {
|
|
62
|
-
this.resizePanel(this.gpuPanel, 2);
|
|
63
|
-
}
|
|
64
|
-
if (this.gpuPanelCompute) {
|
|
65
|
-
this.resizePanel(this.gpuPanelCompute, 3);
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}
|
|
52
|
+
this.dom = document.createElement("div");
|
|
53
|
+
this.initializeDOM();
|
|
54
|
+
this.beginTime = performance.now();
|
|
55
|
+
this.prevTime = this.beginTime;
|
|
56
|
+
this.prevCpuTime = this.beginTime;
|
|
57
|
+
this.fpsPanel = this.addPanel(new _Stats2.Panel("FPS", "#0ff", "#002"), 0);
|
|
58
|
+
this.msPanel = this.addPanel(new _Stats2.Panel("CPU", "#0f0", "#020"), 1);
|
|
59
|
+
this.setupEventListeners();
|
|
69
60
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
61
|
+
initializeDOM() {
|
|
62
|
+
this.dom.style.cssText = `
|
|
63
|
+
position: fixed;
|
|
64
|
+
top: 0;
|
|
65
|
+
left: 0;
|
|
66
|
+
opacity: 0.9;
|
|
67
|
+
z-index: 10000;
|
|
68
|
+
${this.minimal ? "cursor: pointer;" : ""}
|
|
69
|
+
`;
|
|
79
70
|
}
|
|
80
|
-
|
|
81
|
-
panel2.canvas.style.position = "absolute";
|
|
71
|
+
setupEventListeners() {
|
|
82
72
|
if (this.minimal) {
|
|
83
|
-
|
|
73
|
+
this.dom.addEventListener("click", this.handleClick);
|
|
74
|
+
this.showPanel(this.mode);
|
|
84
75
|
} else {
|
|
85
|
-
|
|
86
|
-
if (this.horizontal) {
|
|
87
|
-
panel2.canvas.style.top = "0px";
|
|
88
|
-
panel2.canvas.style.left = offset * panel2.WIDTH / panel2.PR + "px";
|
|
89
|
-
} else {
|
|
90
|
-
panel2.canvas.style.left = "0px";
|
|
91
|
-
panel2.canvas.style.top = offset * panel2.HEIGHT / panel2.PR + "px";
|
|
92
|
-
}
|
|
76
|
+
window.addEventListener("resize", this.handleResize);
|
|
93
77
|
}
|
|
94
78
|
}
|
|
95
|
-
addPanel(panel2, offset) {
|
|
96
|
-
if (panel2.canvas) {
|
|
97
|
-
this.dom.appendChild(panel2.canvas);
|
|
98
|
-
this.resizePanel(panel2, offset);
|
|
99
|
-
}
|
|
100
|
-
return panel2;
|
|
101
|
-
}
|
|
102
|
-
showPanel(id) {
|
|
103
|
-
for (let i = 0; i < this.dom.children.length; i++) {
|
|
104
|
-
const child = this.dom.children[i];
|
|
105
|
-
child.style.display = i === id ? "block" : "none";
|
|
106
|
-
}
|
|
107
|
-
this.mode = id;
|
|
108
|
-
}
|
|
109
79
|
async init(canvasOrGL) {
|
|
110
80
|
if (!canvasOrGL) {
|
|
111
81
|
console.error('Stats: The "canvas" parameter is undefined.');
|
|
112
82
|
return;
|
|
113
83
|
}
|
|
114
|
-
if (
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
84
|
+
if (this.handleThreeRenderer(canvasOrGL))
|
|
85
|
+
return;
|
|
86
|
+
if (await this.handleWebGPURenderer(canvasOrGL))
|
|
87
|
+
return;
|
|
88
|
+
if (!this.initializeWebGL(canvasOrGL))
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
handleThreeRenderer(renderer) {
|
|
92
|
+
if (renderer.isWebGLRenderer && !this.threeRendererPatched) {
|
|
93
|
+
this.patchThreeRenderer(renderer);
|
|
94
|
+
this.gl = renderer.getContext();
|
|
95
|
+
if (this.trackGPU) {
|
|
96
|
+
this.initializeGPUTracking();
|
|
97
|
+
}
|
|
98
|
+
return true;
|
|
120
99
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
async handleWebGPURenderer(renderer) {
|
|
103
|
+
console.log("renderer", renderer);
|
|
104
|
+
if (renderer.isWebGPURenderer) {
|
|
105
|
+
if (this.trackGPU) {
|
|
106
|
+
console.log("trackGPU", this.trackGPU);
|
|
107
|
+
renderer.backend.trackTimestamp = true;
|
|
108
|
+
if (await renderer.hasFeatureAsync("timestamp-query")) {
|
|
109
|
+
this.initializeWebGPUPanels();
|
|
110
|
+
}
|
|
127
111
|
}
|
|
128
|
-
|
|
129
|
-
|
|
112
|
+
this.info = renderer.info;
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
initializeWebGPUPanels() {
|
|
118
|
+
this.gpuPanel = this.addPanel(new _Stats2.Panel("GPU", "#ff0", "#220"), 2);
|
|
119
|
+
this.gpuPanelCompute = this.addPanel(
|
|
120
|
+
new _Stats2.Panel("CPT", "#e1e1e1", "#212121"),
|
|
121
|
+
3
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
initializeWebGL(canvasOrGL) {
|
|
125
|
+
if (canvasOrGL instanceof WebGL2RenderingContext) {
|
|
126
|
+
this.gl = canvasOrGL;
|
|
127
|
+
} else if (canvasOrGL instanceof HTMLCanvasElement || canvasOrGL instanceof OffscreenCanvas) {
|
|
130
128
|
this.gl = canvasOrGL.getContext("webgl2");
|
|
131
129
|
if (!this.gl) {
|
|
132
130
|
console.error("Stats: Unable to obtain WebGL2 context.");
|
|
133
|
-
return;
|
|
131
|
+
return false;
|
|
134
132
|
}
|
|
135
|
-
} else
|
|
136
|
-
console.error(
|
|
137
|
-
|
|
133
|
+
} else {
|
|
134
|
+
console.error(
|
|
135
|
+
"Stats: Invalid input type. Expected WebGL2RenderingContext, HTMLCanvasElement, or OffscreenCanvas."
|
|
136
|
+
);
|
|
137
|
+
return false;
|
|
138
138
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
initializeGPUTracking() {
|
|
142
|
+
if (this.gl) {
|
|
143
|
+
this.ext = this.gl.getExtension("EXT_disjoint_timer_query_webgl2");
|
|
144
|
+
if (this.ext) {
|
|
145
|
+
this.gpuPanel = this.addPanel(new _Stats2.Panel("GPU", "#ff0", "#220"), 2);
|
|
146
|
+
}
|
|
142
147
|
}
|
|
143
148
|
}
|
|
144
149
|
begin() {
|
|
@@ -147,14 +152,12 @@ const _Stats = class _Stats2 {
|
|
|
147
152
|
}
|
|
148
153
|
if (!this.gl || !this.ext)
|
|
149
154
|
return;
|
|
150
|
-
if (this.
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
this.gl.beginQuery(this.ext.TIME_ELAPSED_EXT, this.activeQuery);
|
|
157
|
-
}
|
|
155
|
+
if (this.activeQuery) {
|
|
156
|
+
this.gl.endQuery(this.ext.TIME_ELAPSED_EXT);
|
|
157
|
+
}
|
|
158
|
+
this.activeQuery = this.gl.createQuery();
|
|
159
|
+
if (this.activeQuery) {
|
|
160
|
+
this.gl.beginQuery(this.ext.TIME_ELAPSED_EXT, this.activeQuery);
|
|
158
161
|
}
|
|
159
162
|
}
|
|
160
163
|
end() {
|
|
@@ -165,6 +168,63 @@ const _Stats = class _Stats2 {
|
|
|
165
168
|
this.activeQuery = null;
|
|
166
169
|
}
|
|
167
170
|
}
|
|
171
|
+
update() {
|
|
172
|
+
if (!this.info) {
|
|
173
|
+
this.processGpuQueries();
|
|
174
|
+
} else {
|
|
175
|
+
this.processWebGPUTimestamps();
|
|
176
|
+
}
|
|
177
|
+
this.endProfiling("cpu-started", "cpu-finished", "cpu-duration");
|
|
178
|
+
this.updateAverages();
|
|
179
|
+
this.resetCounters();
|
|
180
|
+
}
|
|
181
|
+
processWebGPUTimestamps() {
|
|
182
|
+
this.totalGpuDuration = this.info.render.timestamp;
|
|
183
|
+
this.totalGpuDurationCompute = this.info.compute.timestamp;
|
|
184
|
+
this.addToAverage(this.totalGpuDurationCompute, this.averageGpuCompute);
|
|
185
|
+
}
|
|
186
|
+
updateAverages() {
|
|
187
|
+
this.addToAverage(this.totalCpuDuration, this.averageCpu);
|
|
188
|
+
this.addToAverage(this.totalGpuDuration, this.averageGpu);
|
|
189
|
+
}
|
|
190
|
+
resetCounters() {
|
|
191
|
+
this.renderCount = 0;
|
|
192
|
+
if (this.totalCpuDuration === 0) {
|
|
193
|
+
this.beginProfiling("cpu-started");
|
|
194
|
+
}
|
|
195
|
+
this.totalCpuDuration = 0;
|
|
196
|
+
this.totalFps = 0;
|
|
197
|
+
this.beginTime = this.endInternal();
|
|
198
|
+
}
|
|
199
|
+
resizePanel(panel2, offset) {
|
|
200
|
+
panel2.canvas.style.position = "absolute";
|
|
201
|
+
if (this.minimal) {
|
|
202
|
+
panel2.canvas.style.display = "none";
|
|
203
|
+
} else {
|
|
204
|
+
panel2.canvas.style.display = "block";
|
|
205
|
+
if (this.horizontal) {
|
|
206
|
+
panel2.canvas.style.top = "0px";
|
|
207
|
+
panel2.canvas.style.left = offset * panel2.WIDTH / panel2.PR + "px";
|
|
208
|
+
} else {
|
|
209
|
+
panel2.canvas.style.left = "0px";
|
|
210
|
+
panel2.canvas.style.top = offset * panel2.HEIGHT / panel2.PR + "px";
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
addPanel(panel2, offset) {
|
|
215
|
+
if (panel2.canvas) {
|
|
216
|
+
this.dom.appendChild(panel2.canvas);
|
|
217
|
+
this.resizePanel(panel2, offset);
|
|
218
|
+
}
|
|
219
|
+
return panel2;
|
|
220
|
+
}
|
|
221
|
+
showPanel(id) {
|
|
222
|
+
for (let i = 0; i < this.dom.children.length; i++) {
|
|
223
|
+
const child = this.dom.children[i];
|
|
224
|
+
child.style.display = i === id ? "block" : "none";
|
|
225
|
+
}
|
|
226
|
+
this.mode = id;
|
|
227
|
+
}
|
|
168
228
|
processGpuQueries() {
|
|
169
229
|
if (!this.gl || !this.ext)
|
|
170
230
|
return;
|
|
@@ -183,25 +243,6 @@ const _Stats = class _Stats2 {
|
|
|
183
243
|
}
|
|
184
244
|
});
|
|
185
245
|
}
|
|
186
|
-
update() {
|
|
187
|
-
if (this.info === void 0) {
|
|
188
|
-
this.processGpuQueries();
|
|
189
|
-
} else {
|
|
190
|
-
this.totalGpuDuration = this.info.render.timestamp;
|
|
191
|
-
this.totalGpuDurationCompute = this.info.compute.timestamp;
|
|
192
|
-
this.addToAverage(this.totalGpuDurationCompute, this.averageGpuCompute);
|
|
193
|
-
}
|
|
194
|
-
this.endProfiling("cpu-started", "cpu-finished", "cpu-duration");
|
|
195
|
-
this.addToAverage(this.totalCpuDuration, this.averageCpu);
|
|
196
|
-
this.addToAverage(this.totalGpuDuration, this.averageGpu);
|
|
197
|
-
this.renderCount = 0;
|
|
198
|
-
if (this.totalCpuDuration === 0) {
|
|
199
|
-
this.beginProfiling("cpu-started");
|
|
200
|
-
}
|
|
201
|
-
this.totalCpuDuration = 0;
|
|
202
|
-
this.totalFps = 0;
|
|
203
|
-
this.beginTime = this.endInternal();
|
|
204
|
-
}
|
|
205
246
|
endInternal() {
|
|
206
247
|
this.frames++;
|
|
207
248
|
const time = (performance || Date).now();
|
|
@@ -271,12 +312,18 @@ const _Stats = class _Stats2 {
|
|
|
271
312
|
get domElement() {
|
|
272
313
|
return this.dom;
|
|
273
314
|
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
315
|
+
patchThreeRenderer(renderer) {
|
|
316
|
+
const originalRenderMethod = renderer.render;
|
|
317
|
+
const statsInstance = this;
|
|
318
|
+
renderer.render = function(scene, camera) {
|
|
319
|
+
statsInstance.begin();
|
|
320
|
+
originalRenderMethod.call(this, scene, camera);
|
|
321
|
+
statsInstance.end();
|
|
322
|
+
};
|
|
323
|
+
this.threeRendererPatched = true;
|
|
277
324
|
}
|
|
278
325
|
};
|
|
279
|
-
_Stats.Panel = panel;
|
|
326
|
+
_Stats.Panel = panel.Panel;
|
|
280
327
|
let Stats = _Stats;
|
|
281
328
|
module.exports = Stats;
|
|
282
329
|
//# sourceMappingURL=main.cjs.map
|
package/dist/main.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.cjs","sources":["../lib/main.ts"],"sourcesContent":null,"names":["_Stats","panel","Panel"],"m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