Created
June 13, 2023 02:46
-
-
Save denizdogan/6448bf1d3dcc3b95623529250c3e8c8e to your computer and use it in GitHub Desktop.
Deno: Log leaking ops
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setInterval(() => { | |
console.log(Object.fromEntries( | |
Object.entries(Deno.metrics()["ops"]).filter(([k, v]) => | |
Object.values(v).some((y) => y) | |
).map(([op, metrics]) => [ | |
op, | |
metrics.opsDispatchedAsync - metrics.opsCompletedAsync, | |
]).filter(([op, diff]) => diff !== 0), | |
)); | |
console.log(Deno.resources()); | |
}, 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment