memory-usage-logger

    0.0.3 • Public • Published

    memory-usage-logger

    This module logs memory usage in CSV file and builds a chart.

    The example of a result is:

    Chart example

    How to use it?

    var logger = require('memory-usage-logger');
     
    // will log into folder "/absolute/path/to/logs/directory" every 1000 ms:
    logger.run(1000, "/absolute/path/to/logs/directory");
     
    // to stop:
    logger.stop();

    API

    run

    logger.run(delay, logDir)

    delay - delay for setInterval

    logDir - Directory to log data.

    stop

    logger.stop()

    will stop logger which was wun by logger.run().

    setLogDir

    logger.setLogDir('/absolute/path/to/logs/directory')

    You can also set log directory by calling this func.

    setMaxLogSize

    logger.setMaxLogSize(50000)

    Set maximum size of CSV file. It useful, since browsers cannot process big data.

    Install

    npm i memory-usage-logger

    DownloadsWeekly Downloads

    3

    Version

    0.0.3

    License

    MIT

    Last publish

    Collaborators

    • kirill-zhirnov