mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Co-authored-by: Philipp Spiess <hello@philippspiess.com> Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
30 lines
516 B
TypeScript
30 lines
516 B
TypeScript
export class Instrumentation {
|
|
start(label: string) {
|
|
performance.mark(`${label} (start)`)
|
|
}
|
|
|
|
end(label: string, detail?: any) {
|
|
performance.mark(`${label} (end)`)
|
|
|
|
performance.measure(label, {
|
|
start: `${label} (start)`,
|
|
end: `${label} (end)`,
|
|
detail,
|
|
})
|
|
}
|
|
|
|
hit(label: string, detail?: any) {
|
|
performance.mark(label, {
|
|
detail,
|
|
})
|
|
}
|
|
|
|
error(error: any) {
|
|
performance.mark(`(error)`, {
|
|
detail: { error: `${error}` },
|
|
})
|
|
|
|
throw error
|
|
}
|
|
}
|