diff options
Diffstat (limited to 'src/js/out/modules/node/perf_hooks.js')
-rw-r--r-- | src/js/out/modules/node/perf_hooks.js | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/src/js/out/modules/node/perf_hooks.js b/src/js/out/modules/node/perf_hooks.js deleted file mode 100644 index af20677d7..000000000 --- a/src/js/out/modules/node/perf_hooks.js +++ /dev/null @@ -1,65 +0,0 @@ -function throwNotImplemented(feature, issue) { - throw hideFromStack(throwNotImplemented), new NotImplementedError(feature, issue); -} -function hideFromStack(...fns) { - for (let fn of fns) - Object.defineProperty(fn, "name", { - value: "::bunternal::" - }); -} - -class NotImplementedError extends Error { - code; - constructor(feature, issue) { - super(feature + " is not yet implemented in Bun." + (issue ? " Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/" + issue : "")); - this.name = "NotImplementedError", this.code = "ERR_NOT_IMPLEMENTED", hideFromStack(NotImplementedError); - } -} - -// src/js/node/perf_hooks.js -var constants = { - NODE_PERFORMANCE_GC_MAJOR: 4, - NODE_PERFORMANCE_GC_MINOR: 1, - NODE_PERFORMANCE_GC_INCREMENTAL: 8, - NODE_PERFORMANCE_GC_WEAKCB: 16, - NODE_PERFORMANCE_GC_FLAGS_NO: 0, - NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: 2, - NODE_PERFORMANCE_GC_FLAGS_FORCED: 4, - NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: 8, - NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: 16, - NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: 32, - NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: 64 -}, performance = globalThis.performance; - -class PerformanceObserver { - constructor() { - throwNotImplemented("PerformanceObserver"); - } -} - -class PerformanceEntry { - constructor() { - throwNotImplemented("PerformanceEntry"); - } -} - -class PerformanceNodeTiming { - constructor() { - throw new Error("PerformanceNodeTiming is not supported in this environment."); - } -} -var perf_hooks_default = { - performance, - constants, - PerformanceEntry, - PerformanceNodeTiming, - [Symbol.for("CommonJS")]: 0 -}; -export { - performance, - perf_hooks_default as default, - constants, - PerformanceObserver, - PerformanceNodeTiming, - PerformanceEntry -}; |