Skip to content

Commit ca06e0c

Browse files
Fix profiler event not sent
1 parent 9ae97da commit ca06e0c

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/view/components/profiler/components/RenderReasons.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,12 @@ export function RenderReasons() {
8080
: "Capturing disabled. "}
8181
<MessageBtn
8282
onClick={() => {
83-
store.profiler.setRenderReasonCapture(!captureReason);
83+
const value = !captureReason;
84+
store.profiler.setRenderReasonCapture(value);
8485
store.profiler.isRecording.$ = true;
86+
store.emit("start-profiling", {
87+
captureRenderReasons: value,
88+
});
8589
}}
8690
testId="toggle-render-reason"
8791
>

src/view/components/profiler/components/TimelineBar/TimelineBar.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export function TimelineBar() {
4747

4848
const onReset = useCallback(() => {
4949
resetProfiler(store.profiler);
50+
store.emit("stop-profiling", null);
5051
}, [store]);
5152

5253
return (

src/view/components/stats/StatsPanel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export function StatsPanel() {
6161
const onReset = useCallback(() => {
6262
store.stats.data.$ = null;
6363
store.stats.isRecording.$ = false;
64+
store.emit("stop-profiling", null);
6465
}, [store]);
6566

6667
return (

0 commit comments

Comments
 (0)