File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -14,14 +14,18 @@ let uid = 0
14
14
15
15
export function initMixin ( Vue : Class < Component > ) {
16
16
Vue . prototype . _init = function ( options ?: Object ) {
17
+ const vm : Component = this
18
+ // a uid
19
+ vm . _uid = uid ++
20
+
17
21
/* istanbul ignore if */
22
+ let startTag , endTag
18
23
if ( process . env . NODE_ENV !== 'production' && config . performance && mark ) {
19
- mark ( 'vue-perf-init' )
24
+ startTag = `vue-perf-init:${ vm . _uid } `
25
+ endTag = `vue-perf-end:${ vm . _uid } `
26
+ mark ( startTag )
20
27
}
21
28
22
- const vm : Component = this
23
- // a uid
24
- vm . _uid = uid ++
25
29
// a flag to avoid this being observed
26
30
vm . _isVue = true
27
31
// merge options
@@ -57,8 +61,8 @@ export function initMixin (Vue: Class<Component>) {
57
61
/* istanbul ignore if */
58
62
if ( process . env . NODE_ENV !== 'production' && config . performance && mark ) {
59
63
vm . _name = formatComponentName ( vm , false )
60
- mark ( 'vue-perf-init-end' )
61
- measure ( `${ vm . _name } init` , 'vue-perf-init' , 'vue-perf-init-end' )
64
+ mark ( endTag )
65
+ measure ( `${ vm . _name } init` , startTag , endTag )
62
66
}
63
67
64
68
if ( vm . $options . el ) {
You can’t perform that action at this time.
0 commit comments