Skip to content

Commit 421a0c7

Browse files
hoxyqfacebook-github-bot
authored andcommitted
fix: reset maxDuration only after recording TracingStartedInPage event (#53080)
Summary: Pull Request resolved: #53080 # Changelog: [Internal] We were accidentally resetting this before calculating the timestampf for the TracingStartedInPage event, which is the left boundary for the timeline window. Reviewed By: sbuggay Differential Revision: D79670865 fbshipit-source-id: c6b5f869e185d6d3c80cb7153891c72283c82418
1 parent 593bdc6 commit 421a0c7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/react-native/ReactCommon/jsinspector-modern/tracing/PerformanceTracer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ std::optional<std::vector<TraceEvent>> PerformanceTracer::stopTracing() {
7777

7878
tracingAtomic_ = false;
7979
performanceMeasureCount_ = 0;
80-
currentTraceMaxDuration_ = std::nullopt;
8180

8281
events = collectEventsAndClearBuffers(currentTraceEndTime);
8382
}
@@ -114,6 +113,7 @@ std::optional<std::vector<TraceEvent>> PerformanceTracer::stopTracing() {
114113
.tid = oscompat::getCurrentThreadId(),
115114
});
116115

116+
currentTraceMaxDuration_ = std::nullopt;
117117
return events;
118118
}
119119

0 commit comments

Comments
 (0)