summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/perf_hooks.ts
diff options
context:
space:
mode:
authorhaturau <135221985+haturatu@users.noreply.github.com>2024-11-20 01:20:47 +0900
committerGitHub <noreply@github.com>2024-11-20 01:20:47 +0900
commit85719a67e59c7aa45bead26e4942d7df8b1b42d4 (patch)
treeface0aecaac53e93ce2f23b53c48859bcf1a36ec /ext/node/polyfills/perf_hooks.ts
parent67697bc2e4a62a9670699fd18ad0dd8efc5bd955 (diff)
parent186b52731c6bb326c4d32905c5e732d082e83465 (diff)
Merge branch 'denoland:main' into main
Diffstat (limited to 'ext/node/polyfills/perf_hooks.ts')
-rw-r--r--ext/node/polyfills/perf_hooks.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/node/polyfills/perf_hooks.ts b/ext/node/polyfills/perf_hooks.ts
index d92b925b5..ec76b3ce2 100644
--- a/ext/node/polyfills/perf_hooks.ts
+++ b/ext/node/polyfills/perf_hooks.ts
@@ -8,6 +8,7 @@ import {
performance as shimPerformance,
PerformanceEntry,
} from "ext:deno_web/15_performance.js";
+import { EldHistogram } from "ext:core/ops";
class PerformanceObserver {
static supportedEntryTypes: string[] = [];
@@ -89,10 +90,11 @@ const performance:
) => shimPerformance.dispatchEvent(...args),
};
-const monitorEventLoopDelay = () =>
- notImplemented(
- "monitorEventLoopDelay from performance",
- );
+function monitorEventLoopDelay(options = {}) {
+ const { resolution = 10 } = options;
+
+ return new EldHistogram(resolution);
+}
export default {
performance,