Skip to content

Commit

Permalink
Adding performance API timings to visualize app-scheduler execut… (#491)
Browse files Browse the repository at this point in the history
  • Loading branch information
scalvert committed Dec 2, 2019
1 parent 1abe284 commit 7042abb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions addon/scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,20 @@ export function beginTransition(): void {
});
}).finally(() => {
waiter.endAsync(scheduledWorkToken);
performance.mark('appSchedulerEnd');
performance.measure(
'appScheduler',
'appSchedulerStart',
'appSchedulerEnd'
);
});
});
}
}

export function endTransition(): void {
_whenRouteDidChange.resolve();
performance.mark('appSchedulerStart');
}

export function setupRouter(router: Router): void {
Expand Down

0 comments on commit 7042abb

Please sign in to comment.