Replies: 1 comment
-
My go to solution for now, based on 56c54cc export default defineEventHandler(async (event) => {
globalThis.__timing__.logStart('someLogPoint')
// Do something
globalThis.__timing__.logEnd('someLogPoint')
}) To make it work with TS, I add global type for that: // overrides.d.ts
declare global {
var __timing__: {
logStart: (id: string) => void
logEnd: (id: string) => void
}
}
export { } |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hello
may I ask how coud I inject some server statics into the server-timing metrics on nitro? maybe in the server middleware?
Beta Was this translation helpful? Give feedback.
All reactions