Skip to content

lovwal/node-gc-slowlog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Install

$ npm install node-gc-slowlog

Usage

To use the module, import it and optionally set the threshold. By default, all gc events taking longer than 20ms are logged.

const gcSlowLog = require('node-gc-slowlog')
// Set the minimum slowlog threshold to 50ms.
gcSlowLog.setThreshold(50)

General

The module uses perf_hooks to attach to GC events. Each GC event is logged if it breaches the threshold (by default 20ms). The events are logged with a RFC3339 timestamp:

2019-07-14T18:45:04.405Z msg="slow GC detected" type=minor duration=10.439927ms

License

MIT ©

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published