Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
as-heap-analyzer
Advanced tools
assemblyscript heap dump analysis tooling
npm i -D as-heap-analyzer
--transform as-heap-analyzer/transform/addHeapAnalyzerInfo.mjs
or add following line in asconfig.json
"transform": ["as-heap-analyzer/transform/addHeapAnalyzerInfo.mjs"]
analysis
functionimport { memory } from "../build/debug.js";
import { readFileSync } from "fs";
import { analysis } from "as-heap-analyzer/dist/index.js";
import assert from "assert";
const wasm = readFileSync("build/debug.wasm");
const memoryUsage = analysis(memory, wasm);
memoryUsage.forEach((v, k) => console.log(`${k} use ${v} bytes`));
analysis
functionimport { memory } from "./build/release.js";
import { analysis } from "as-heap-analyzer/dist/index.js";
const wasm = (await (await fetch(new URL("build/release.wasm", import.meta.url))).body.getReader().read()).value;
const memoryUsage = analysis(new Uint8Array(memory.buffer), wasm);
memoryUsage.forEach((v, k) => {
document.body.innerText += `${k} use ${v} bytes\n`;
});
import { dumpUsedMemoryDetail } from "as-heap-analyzer/assembly/index";
trace(dumpUsedMemoryDetail());
npx as-heap-analyzer frame <transformed_wasm_module_path>
copy and paste self-diagnosis result from log to cli
the result should be:
total memory usage is 48300
class ~lib/arraybuffer/ArrayBuffer use 544 bytes
class assembly/index/A use 6400 bytes
class ~lib/array/Array<assembly/index/A> use 48 bytes
class assembly/index/B use 32 bytes
FAQs
assemblyscript heap dump analysis tooling
The npm package as-heap-analyzer receives a total of 0 weekly downloads. As such, as-heap-analyzer popularity was classified as not popular.
We found that as-heap-analyzer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.