MCPcopy
hub / github.com/vuejs/core / endMeasure

Function endMeasure

packages/runtime-core/src/profiling.ts:24–42  ·  view source on GitHub ↗
(
  instance: ComponentInternalInstance,
  type: string,
)

Source from the content-addressed store, hash-verified

22}
23
24export function endMeasure(
25 instance: ComponentInternalInstance,
26 type: string,
27): void {
28 if (instance.appContext.config.performance && isSupported()) {
29 const startTag = `vue-${type}-${instance.uid}`
30 const endTag = startTag + `:end`
31 const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`
32 perf.mark(endTag)
33 perf.measure(measureName, startTag, endTag)
34 perf.clearMeasures(measureName)
35 perf.clearMarks(startTag)
36 perf.clearMarks(endTag)
37 }
38
39 if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
40 devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now())
41 }
42}
43
44function isSupported() {
45 if (supported !== undefined) {

Callers 4

mountComponentFunction · 0.90
hydrateSubTreeFunction · 0.90
componentUpdateFnFunction · 0.90
finishComponentSetupFunction · 0.90

Calls 2

formatComponentNameFunction · 0.90
isSupportedFunction · 0.85

Tested by

no test coverage detected