Преглед изворни кода

fix(devtools): clear performance measures (#13701)

close #13700
awaken1ng пре 9 месеци
родитељ
комит
c875019d49
1 измењених фајлова са 3 додато и 5 уклоњено
  1. 3 5
      packages/runtime-core/src/profiling.ts

+ 3 - 5
packages/runtime-core/src/profiling.ts

@@ -28,12 +28,10 @@ export function endMeasure(
   if (instance.appContext.config.performance && isSupported()) {
     const startTag = `vue-${type}-${instance.uid}`
     const endTag = startTag + `:end`
+    const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`
     perf.mark(endTag)
-    perf.measure(
-      `<${formatComponentName(instance, instance.type)}> ${type}`,
-      startTag,
-      endTag,
-    )
+    perf.measure(measureName, startTag, endTag)
+    perf.clearMeasures(measureName)
     perf.clearMarks(startTag)
     perf.clearMarks(endTag)
   }