Negligent Pachinko Machine

    @doubret/inspector-vm
    TypeScript icon, indicating that this package has built-in type declarations

    3.1.0 • Public • Published

    inspector-vm

    NodeJS VM Metric Collector

    NPM Version License Build Status Dependencies Status

    install

    This library is meant to be used with typescript / nodejs.

    npm install --save inspector-vm

    basic usage

    import { MetricRegistry } from "inspector-metrics";
    import { V8MemoryMetrics, V8GCMetrics } from "inspector-vm";
    
    // get a registry
    const registry: MetricRegistry = ...;
    
    // instance the memory metric, contains
    //   - space statistics
    //   - memory statistics
    const memoryMetrics: V8MemoryMetrics = new V8MemoryMetrics("v8", registry.getDefaultClock());
    //   - gc statistics
    const gcMetrics: V8GCMetrics = new V8GCMetrics("gc", registry.getDefaultClock());
    
    // metric is registered und the name "v8"
    // defaults to group "gc"
    registry.register(memoryMetrics.getName(), memoryMetrics);
    
    // setup reporter ...
    
    // note that unstopped metrics can cause the application to keep running
    gcMetrics.stop();
    memoryMetrics.stop();

    License

    MIT

    Install

    npm i @doubret/inspector-vm

    DownloadsWeekly Downloads

    1

    Version

    3.1.0

    License

    MIT

    Unpacked Size

    85.3 kB

    Total Files

    34

    Last publish

    Collaborators

    • doubret