Files
mastodon/app/javascript/flavours/glitch/utils/performance.ts
2025-08-01 22:17:21 +02:00

20 lines
413 B
TypeScript

//
// 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);
}
}