Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
31 lines
910 B
Plaintext
31 lines
910 B
Plaintext
/* eslint-disable @sentry-internal/sdk/no-unsafe-random-apis */
|
|
// Polyfill for Node.js perf_hooks module in edge runtime
|
|
// This mirrors the polyfill from packages/vercel-edge/rollup.npm.config.mjs
|
|
const __sentry__timeOrigin = Date.now();
|
|
|
|
// Ensure performance global is available
|
|
if (typeof globalThis !== 'undefined' && globalThis.performance === undefined) {
|
|
globalThis.performance = {
|
|
timeOrigin: __sentry__timeOrigin,
|
|
now: function () {
|
|
return Date.now() - __sentry__timeOrigin;
|
|
},
|
|
};
|
|
}
|
|
|
|
// Export the performance object for perf_hooks compatibility
|
|
const performance = globalThis.performance || {
|
|
timeOrigin: __sentry__timeOrigin,
|
|
now: function () {
|
|
return Date.now() - __sentry__timeOrigin;
|
|
},
|
|
};
|
|
|
|
// Default export for CommonJS compatibility
|
|
const perf_hooks = {
|
|
performance,
|
|
};
|
|
|
|
export { perf_hooks as default, performance };
|
|
//# sourceMappingURL=perf_hooks.js.map
|