You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
413 B
20 lines
413 B
|
5 months ago
|
//
|
||
|
|
// Tools for performance debugging, only enabled in development mode.
|
||
|
|
// Open up Chrome Dev Tools, then Timeline, then User Timing to see output.
|
||
|
|
|
||
|
|
import * as marky from 'marky';
|
||
|
|
|
||
|
|
import { isDevelopment } from './environment';
|
||
|
|
|
||
|
|
export function start(name: string) {
|
||
|
|
if (isDevelopment()) {
|
||
|
|
marky.mark(name);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
export function stop(name: string) {
|
||
|
|
if (isDevelopment()) {
|
||
|
|
marky.stop(name);
|
||
|
|
}
|
||
|
|
}
|