diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2021-04-12 10:47:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-12 10:47:44 +0200 |
commit | bf99039ea944c32f0247ad8b3d1057f20f921b40 (patch) | |
tree | 043ef9572f5fba55bf25bf6a3945f22d46ea22ca /cli/tests | |
parent | fefe93c91b63e35bf88f5f432f0cca09948d0623 (diff) |
feat: Add Deno.memoryUsage() (#9986)
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/heapstats.js | 8 | ||||
-rw-r--r-- | cli/tests/integration_tests.rs | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/cli/tests/heapstats.js b/cli/tests/heapstats.js index 0ed623e56..fba9e66d9 100644 --- a/cli/tests/heapstats.js +++ b/cli/tests/heapstats.js @@ -2,15 +2,15 @@ "use strict"; function allocTest(alloc, allocAssert, deallocAssert) { - // Helper func that GCs then returns heapStats + // Helper func that GCs then returns memory usage const sample = () => { // deno-lint-ignore no-undef gc(); - return Deno.core.heapStats(); + return Deno.memoryUsage(); }; - const delta = (t1, t2) => t2.usedHeapSize - t1.usedHeapSize; + const delta = (t1, t2) => t2.heapUsed - t1.heapUsed; - // Sample "clean" heapStats + // Sample "clean" heap usage const t1 = sample(); // Alloc diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 5067b8163..f856b90b8 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -3250,7 +3250,7 @@ console.log("finish"); }); itest!(heapstats { - args: "run --quiet --v8-flags=--expose-gc heapstats.js", + args: "run --quiet --unstable --v8-flags=--expose-gc heapstats.js", output: "heapstats.js.out", }); |