Files
mastodon-sakyey/app/javascript/mastodon/utils/performance.ts

20 lines
413 B
TypeScript
Raw Normal View History

//
// 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';
2025-07-31 19:30:14 +02:00
import { isDevelopment } from './environment';
2025-07-31 19:30:14 +02:00
export function start(name: string) {
if (isDevelopment()) {
marky.mark(name);
}
}
2025-07-31 19:30:14 +02:00
export function stop(name: string) {
if (isDevelopment()) {
marky.stop(name);
}
}