Skip to content

Commit 894d380

Browse files
kazuponyyx990803
authored andcommitted
refactor: Improve DevTools perfromance user timing measurement name (#6624)
1 parent 0f2cb09 commit 894d380

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/core/instance/init.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function initMixin (Vue: Class<Component>) {
2121
let startTag, endTag
2222
/* istanbul ignore if */
2323
if (process.env.NODE_ENV !== 'production' && config.performance && mark) {
24-
startTag = `vue-perf-init:${vm._uid}`
24+
startTag = `vue-perf-start:${vm._uid}`
2525
endTag = `vue-perf-end:${vm._uid}`
2626
mark(startTag)
2727
}
@@ -62,7 +62,7 @@ export function initMixin (Vue: Class<Component>) {
6262
if (process.env.NODE_ENV !== 'production' && config.performance && mark) {
6363
vm._name = formatComponentName(vm, false)
6464
mark(endTag)
65-
measure(`${vm._name} init`, startTag, endTag)
65+
measure(`vue ${vm._name} init`, startTag, endTag)
6666
}
6767

6868
if (vm.$options.el) {

src/core/instance/lifecycle.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,12 @@ export function mountComponent (
176176
mark(startTag)
177177
const vnode = vm._render()
178178
mark(endTag)
179-
measure(`${name} render`, startTag, endTag)
179+
measure(`vue ${name} render`, startTag, endTag)
180180

181181
mark(startTag)
182182
vm._update(vnode, hydrating)
183183
mark(endTag)
184-
measure(`${name} patch`, startTag, endTag)
184+
measure(`vue ${name} patch`, startTag, endTag)
185185
}
186186
} else {
187187
updateComponent = () => {

src/platforms/web/entry-runtime-with-compiler.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Vue.prototype.$mount = function (
7373
/* istanbul ignore if */
7474
if (process.env.NODE_ENV !== 'production' && config.performance && mark) {
7575
mark('compile end')
76-
measure(`${this._name} compile`, 'compile', 'compile end')
76+
measure(`vue ${this._name} compile`, 'compile', 'compile end')
7777
}
7878
}
7979
}

0 commit comments

Comments
 (0)