Optimize table loading (#866)
* wip * wip * Ok * Deleted unused code * Fixed lint * Minor fixes * Minor fixes * Minor Fixes * Minor merge fixes * Ok * Fix storybook tests * Removed console.log * Fix login * asd * Fixed storybook * Added await * Fixed await * Added sleep for failing test * Fix sleep * Fix test * Fix tests --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
11
front/src/utils/measureTotalFrameLoad.ts
Normal file
11
front/src/utils/measureTotalFrameLoad.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import afterFrame from 'afterframe';
|
||||
|
||||
export function measureTotalFrameLoad(id: string) {
|
||||
const timerId = `Total loading time for : ${id}`;
|
||||
|
||||
console.time(timerId);
|
||||
|
||||
afterFrame(() => {
|
||||
console.timeEnd(timerId);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user