1
1
/* @flow */
2
2
3
3
import config from '../config'
4
- import { perf } from '../util/perf'
5
4
import { initProxy } from './proxy'
6
5
import { initState } from './state'
7
6
import { initRender } from './render'
8
7
import { initEvents } from './events'
8
+ import { mark , measure } from '../util/perf'
9
9
import { initLifecycle , callHook } from './lifecycle'
10
10
import { initProvide , initInjections } from './inject'
11
11
import { extend , mergeOptions , formatComponentName } from '../util/index'
@@ -15,8 +15,8 @@ let uid = 0
15
15
export function initMixin ( Vue : Class < Component > ) {
16
16
Vue . prototype . _init = function ( options ?: Object ) {
17
17
/* istanbul ignore if */
18
- if ( process . env . NODE_ENV !== 'production' && config . performance && perf ) {
19
- perf . mark ( 'init' )
18
+ if ( process . env . NODE_ENV !== 'production' && config . performance && mark ) {
19
+ mark ( 'init' )
20
20
}
21
21
22
22
const vm : Component = this
@@ -55,10 +55,10 @@ export function initMixin (Vue: Class<Component>) {
55
55
callHook ( vm , 'created' )
56
56
57
57
/* istanbul ignore if */
58
- if ( process . env . NODE_ENV !== 'production' && config . performance && perf ) {
58
+ if ( process . env . NODE_ENV !== 'production' && config . performance && mark ) {
59
59
vm . _name = formatComponentName ( vm , false )
60
- perf . mark ( 'init end' )
61
- perf . measure ( `${ vm . _name } init` , 'init' , 'init end' )
60
+ mark ( 'init end' )
61
+ measure ( `${ vm . _name } init` , 'init' , 'init end' )
62
62
}
63
63
64
64
if ( vm . $options . el ) {
0 commit comments