@samitouri / QOS-React-2 / commits / 2edf449803

Scheduling Profiler: Renamed a misnamed variable

Brian Vaughn committed Aug 6, 2021 at 15:03 UTC 2edf449803378b5c58168727d4f123de3ba5d37f
1 file changed +2 -1
packages/react-devtools-scheduling-profiler/src/import-worker/preprocessData.js
+2 -1
@@ -55,6 +55,7 @@ type ProcessorState = {|
55 |};
56
57 const NATIVE_EVENT_DURATION_THRESHOLD = 20;
58 +const NESTED_UPDATE_DURATION_THRESHOLD = 20;
59
60 const WARNING_STRINGS = {
61 LONG_EVENT_HANDLER:
@@ -731,7 +732,7 @@ export default function preprocessData(
732 state.potentialLongNestedUpdates.forEach(([schedulingEvent, batchUID]) => {
733 // See how long the subsequent batch of React work was.
734 const [startTime, stopTime] = getBatchRange(batchUID, profilerData);
734 - if (stopTime - startTime > NATIVE_EVENT_DURATION_THRESHOLD) {
735 + if (stopTime - startTime > NESTED_UPDATE_DURATION_THRESHOLD) {
736 schedulingEvent.warning = WARNING_STRINGS.NESTED_UPDATE;
737 }
738 });