blueprints/ember-perf-initializer/files/app/instance-initializers/__name__.js
export function initialize() {
// Handle 1.12.x case, where signature is
// initialize(instance) {...}
const instance = arguments[1] || arguments[0];
const container = !!arguments[1] ? arguments[0] : instance.container;
let perfService = container.lookup('service:ember-perf');
perfService.on('transitionComplete', transitionData => {
// DO SOMETHING WITH TRANSITION DATA
});
perfService.on('renderComplete', transitionData => {
// DO SOMETHING WITH RENDER DATA
});
}
export default {
name: '<%= dasherizedModuleName %>-instance',
initialize
};