feat: debugmode full request

This commit is contained in:
Julien Froidefond
2025-02-23 15:12:59 +01:00
parent 1cffe6913a
commit 6b19f5b54b
18 changed files with 721 additions and 133 deletions

View File

@@ -0,0 +1,16 @@
import { DebugService } from "@/lib/services/debug.service";
type PageComponent = (props: any) => Promise<JSX.Element> | JSX.Element;
export function withPageTiming(pageName: string, Component: PageComponent) {
return async function PageWithTiming(props: any) {
const start = performance.now();
const result = await Promise.resolve(Component(props));
const duration = performance.now() - start;
// Log le temps de rendu
await DebugService.logPageRender(pageName, duration);
return result;
};
}