File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -14,14 +14,18 @@ let uid = 0
1414
1515export function initMixin ( Vue : Class < Component > ) {
1616 Vue . prototype . _init = function ( options ?: Object ) {
17+ const vm : Component = this
18+ // a uid
19+ vm . _uid = uid ++
20+
1721 /* istanbul ignore if */
22+ let startTag , endTag
1823 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 )
2027 }
2128
22- const vm : Component = this
23- // a uid
24- vm . _uid = uid ++
2529 // a flag to avoid this being observed
2630 vm . _isVue = true
2731 // merge options
@@ -57,8 +61,8 @@ export function initMixin (Vue: Class<Component>) {
5761 /* istanbul ignore if */
5862 if ( process . env . NODE_ENV !== 'production' && config . performance && mark ) {
5963 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 )
6266 }
6367
6468 if ( vm . $options . el ) {
You can’t perform that action at this time.
0 commit comments