13 lines
264 B
TypeScript
13 lines
264 B
TypeScript
/* eslint-disable no-console */
|
|
import afterFrame from 'afterframe';
|
|
|
|
export const measureTotalFrameLoad = (id: string) => {
|
|
const timerId = `Total loading time for : ${id}`;
|
|
|
|
console.time(timerId);
|
|
|
|
afterFrame(() => {
|
|
console.timeEnd(timerId);
|
|
});
|
|
};
|