@@ -200,7 +200,7 @@ const reusableComponentOptions: PerformanceMeasureOptions = {
200200 } ,
201201} ;
202202
203- const resuableChangedPropsEntry = [ 'Changed Props' , '' ] ;
203+ const reusableChangedPropsEntry = [ 'Changed Props' , '' ] ;
204204
205205const DEEP_EQUALITY_WARNING =
206206 'This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.' ;
@@ -261,7 +261,7 @@ export function logComponentRender(
261261 alternate . memoizedProps !== props
262262 ) {
263263 // If this is an update, we'll diff the props and emit which ones changed.
264- const properties : Array < [ string , string ] > = [ resuableChangedPropsEntry ] ;
264+ const properties : Array < [ string , string ] > = [ reusableChangedPropsEntry ] ;
265265 const isDeeplyEqual = addObjectDiffToProperties (
266266 alternate . memoizedProps ,
267267 props ,
@@ -293,18 +293,20 @@ export function logComponentRender(
293293 reusableComponentOptions . start = startTime ;
294294 reusableComponentOptions . end = endTime ;
295295
296+ const measureName = '\u200b' + name ;
296297 if ( debugTask != null ) {
297298 debugTask . run (
298299 // $FlowFixMe[method-unbinding]
299300 performance . measure . bind (
300301 performance ,
301- '\u200b' + name ,
302+ measureName ,
302303 reusableComponentOptions ,
303304 ) ,
304305 ) ;
305306 } else {
306- performance . measure ( '\u200b' + name , reusableComponentOptions ) ;
307+ performance . measure ( measureName , reusableComponentOptions ) ;
307308 }
309+ performance . clearMeasures ( measureName ) ;
308310 }
309311 } else {
310312 if ( debugTask != null ) {
@@ -397,14 +399,17 @@ export function logComponentErrored(
397399 } ,
398400 } ,
399401 } ;
402+
403+ const measureName = '\u200b' + name ;
400404 if ( __DEV__ && debugTask ) {
401405 debugTask . run (
402406 // $FlowFixMe[method-unbinding]
403- performance . measure . bind ( performance , '\u200b' + name , options ) ,
407+ performance . measure . bind ( performance , measureName , options ) ,
404408 ) ;
405409 } else {
406- performance . measure ( '\u200b' + name , options ) ;
410+ performance . measure ( measureName , options ) ;
407411 }
412+ performance . clearMeasures ( measureName ) ;
408413 } else {
409414 console . timeStamp (
410415 name ,
@@ -464,14 +469,16 @@ function logComponentEffectErrored(
464469 } ,
465470 } ;
466471 const debugTask = fiber . _debugTask ;
472+ const measureName = '\u200b' + name ;
467473 if ( debugTask ) {
468474 debugTask . run (
469475 // $FlowFixMe[method-unbinding]
470- performance . measure . bind ( performance , '\u200b' + name , options ) ,
476+ performance . measure . bind ( performance , measureName , options ) ,
471477 ) ;
472478 } else {
473- performance . measure ( '\u200b' + name , options ) ;
479+ performance . measure ( measureName , options ) ;
474480 }
481+ performance . clearMeasures ( measureName ) ;
475482 } else {
476483 console . timeStamp (
477484 name ,
0 commit comments