Skip to main content

None of the above — ask the heap directly

These tools are in the ask toolset. Starting the server with MEMLAB_TOOLSETS=ask exposes only them, plus the few tools every session needs, and memlab_tools({enable: "ask"}) turns them on in a session. Try them in the order listed.

ToolUse it when
memlab_evalArbitrary JS over the snapshot, with indexed helpers (byClass, iterByType, classCounts, entries, dominates, pathBetween). result = helpers.help() lists every helper with its signature (helpers.help("name") for one in full), helpers.global("name") reads a page global, helpers.isArtifact(id) names the dev/harness/artifact family a node belongs to (null = app), and mode:"describe_env" gives the calling convention. save_as on a node-id result makes a named population other tools take as population: "<name>". This is the escape hatch when no fixed-shape tool matches the question.
memlab_eval_acrossThe same eval program run against several snapshots at once — resident ones, or files and round rungs it loads one at a time — comparative questions without the switch-and-diff. format: "table" prints scalar results as one key × rung table with a Δ column; compare: "growth" ranks every key of a {key: number} result by its growth across the rungs (Δ, Δ/cycle, last-interval Δ, rate per interval and a Shape: only linear that survives settle is a leak candidate), e.g. per object with helpers.stableKey. format: "json" returns one {rung: result} object for results of any shape; helpers.rung / helpers.isSettle tell the code which rung it is on (run_dir + include_settle adds the settle rung). save_as keeps each rung's node-id result as one named population for memlab_validate_finding({population}) and the single-snapshot tools.
memlab_auto_investigateWhen you do not yet have a question: runs the standard deep-dive and reports what it found.
memlab_toolsThis index. Filter it with question or look a tool up with tool.