vlt / docs

  • PricingBenchmarks (opens in new window)Community (opens in new window)Feedback
  • Overview
    • Overview
    • error
    • index
    • Reference
    • trace
  • TODO
  • Tracing
  1. Client
  2. /
  3. API Reference
  4. /
  5. @vltpkg/output

@vltpkg/output

package-info

@vltpkg/output

TODO

Tracing

@vltpkg/output/trace is a low overhead tracer for the install pipeline. It is off unless one of these is set, and when off every call returns after one boolean check.

  • VLT_TRACE=<file> appends one JSON line per event to <file>. Every thread writes to the same file with the same wall clock, so worker events and main thread events sort onto one timeline by t.
  • VLT_PHASES=1 prints one PHASES ... line to stderr at exit: the milliseconds between consecutive phase marks, the event loop delay percentiles (how long the main thread was busy with synchronous work while IO completions waited), and peak memory.
Terminal
VLT_TRACE=trace.jsonl VLT_PHASES=1 vlt install
./scripts/trace-report.ts trace.jsonl --bucket=250

The report prints the phase timeline, what each span kind cost (manifest, request, extract, tarball:fetch, tarball:unpack, inflate, write), how many of each were in flight per time bucket, and for every phase how long each lane sat idle. An idle lane next to a busy one is a head-of-line stall.

Event kinds: phase (from mark()), <kind>:start/<kind>:end (from span(), paired by url, spec or name), request (the registry client's request events), lane (scheduler occupancy), rss (memory samples), build:level* (one BFS level of the ideal graph build), open and exit.


PreviousReferenceNexterror

On this page

  • TODO
  • Tracing

Deploy your package on vlt.io

Publish scoped and private packages, manage organizations and access, and give every developer and CI environment a consistent source for public and private JavaScript dependencies.

Publish now