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

Function startMeasure

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

Source from the content-addressed store, hash-verified

9let perf: Performance
10
11export function startMeasure(
12 instance: ComponentInternalInstance,
13 type: string,
14): void {
15 if (instance.appContext.config.performance && isSupported()) {
16 perf.mark(`vue-${type}-${instance.uid}`)
17 }
18
19 if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
20 devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now())
21 }
22}
23
24export function endMeasure(
25 instance: ComponentInternalInstance,

Callers 4

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

Calls 1

isSupportedFunction · 0.85

Tested by

no test coverage detected