mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-08 02:41:06 +00:00
20 lines
403 B
JavaScript
20 lines
403 B
JavaScript
//
|
|
// 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 './utils/environment';
|
|
|
|
export function start(name) {
|
|
if (isDevelopment()) {
|
|
marky.mark(name);
|
|
}
|
|
}
|
|
|
|
export function stop(name) {
|
|
if (isDevelopment()) {
|
|
marky.stop(name);
|
|
}
|
|
}
|