• Stars
    star
    191
  • Rank 202,877 (Top 4 %)
  • Language
    C++
  • License
    MIT License
  • Created about 10 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Allows you to profile when the garbage collector runs, and how long it takes.

node-gc-profiler

A cross-platform (tested on Linux, Windows, and OSX) profiler for the v8 garbage collector running inside Node.js. It will emit an event after every GC cycle providing you information about the duration and type of cycle.

npm install gc-profiler

Example:

var profiler = require('gc-profiler');
profiler.on('gc', function (info) {
  console.log(info);
});

The info object contains the following properties:

Property Type Description
date Date The approximate start time of the GC cycle. This uses the c++ time library internally, which only has one-second resolution.
duration number The duration of the GC cycle in milliseconds.
type string Either Scavenge or MarkSweepCompact depending on the type of GC cycle.
forced boolean True for a forced cycle.
flags number The raw GCCallbackFlags provided from v8.

The profiler.GCCallbackFlags enumeration is provided to help decode the flags property.

profiler.GCCallbackFlags = {
  kNoGCCallbackFlags: 0,
  kGCCallbackFlagCompacted: 1 << 0, // this flag is never set in v8 versions >= 3.6.5
  kGCCallbackFlagConstructRetainedObjectInfos: 1 << 1,
  kGCCallbackFlagForced: 1 << 2
};

More Repositories

1

neo4j-js

A Node.js (pure JavaScript) client library for accessing neo4j databases with batch support.
JavaScript
123
star
2

Mayflower.NET

SQL Server Migrator
C#
47
star
3

PerformanceTypes

A collection of low (or zero) allocation algorithms for .NET
C#
25
star
4

vagrant-neo4j

A vagrant configuration to run Neo4j 2.0 in a VirtualBox.
Shell
7
star
5

tacoverflow

6
star
6

EnumToSql

A simple .NET console application which replicates C# enums to SQL Server
C#
5
star
7

node-bcp

Node.js utility for interacting with SQL Server Bulk Copy Program (bcp).
JavaScript
5
star
8

BitPacker

A simple binary serializer for .NET.
C#
5
star
9

tedium

A generator-based wrapper for Tedious to make it easier to work with
JavaScript
2
star
10

neo-debug

A more configurable debug utility module for Node.js.
JavaScript
1
star
11

Jadeite

Maybe someday it will be a C# templating engine
C#
1
star
12

idiot-check

A chrome extension to remind you when you're on production vs. local.
JavaScript
1
star
13

coback

Creates standard callbacks which have a yieldable component, allowing you to pass them as a traditional callback, but yield on them later.
JavaScript
1
star
14

oshi

A scripting-based process manager for node.js.
JavaScript
1
star
15

node-ubuntu-build

A simple Ubuntu Script to build and Install Node.js on Ubuntu
Shell
1
star
16

arguer

Normalizes arguments for JavaScript functions with optional arguments and provides optional typing.
JavaScript
1
star
17

koa-trail

A koa router which supports chained route matching.
JavaScript
1
star
18

flex-events

A powerful, flexible and highly customizable event system for JavaScript. Supports all browsers and Node.js.
JavaScript
1
star
19

StopwatchStruct

Value type implementation of the C# stopwatch.
C#
1
star