All Projects → wallet77 → v8-inspector-api

wallet77 / v8-inspector-api

Licence: MIT license
A simple node module to access V8 inspector + some tools to export and read the data.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to v8-inspector-api

V8js
V8 Javascript Engine for PHP — This PHP extension embeds the Google V8 Javascript Engine
Stars: ✭ 1,659 (+3758.14%)
Mutual labels:  v8-javascript-engine, v8js
Vol3xp
Volatility Explorer Suit
Stars: ✭ 31 (-27.91%)
Mutual labels:  memory, memory-dump
Osvvm
OSVVM Utility Library: AlertLogPkg, CoveragePkg, RandomPkg, ScoreboardGenericPkg, MemoryPkg, TbUtilPkg, TranscriptPkg, ...
Stars: ✭ 140 (+225.58%)
Mutual labels:  coverage, memory
MultiGame
MultiGame is a tool for rapid development in Unity
Stars: ✭ 16 (-62.79%)
Mutual labels:  inspector
moneta
Moneta is a live usermode memory analysis tool for Windows with the capability to detect malware IOCs
Stars: ✭ 384 (+793.02%)
Mutual labels:  memory
travis-ci-tutorial-java
Just to learn how to use travis-ci in a java project!
Stars: ✭ 38 (-11.63%)
Mutual labels:  coverage
httplab
The interactive web server
Stars: ✭ 3,856 (+8867.44%)
Mutual labels:  inspector
nodejs
Node.js in-process collectors for Instana
Stars: ✭ 66 (+53.49%)
Mutual labels:  memory
memory signature
A small wrapper class providing an unified interface to search for various memory signatures
Stars: ✭ 69 (+60.47%)
Mutual labels:  memory
OGMNeo
[No Maintenance] Neo4j nodeJS OGM(object-graph mapping) abstraction layer
Stars: ✭ 54 (+25.58%)
Mutual labels:  coverage
BitPack
BitPack is a practical tool to efficiently save ultra-low precision/mixed-precision quantized models.
Stars: ✭ 36 (-16.28%)
Mutual labels:  memory
human-memory
Course materials for Dartmouth course: Human Memory (PSYC 51.09)
Stars: ✭ 239 (+455.81%)
Mutual labels:  memory
intuit-spring-cloud-config-inspector
Inspection of Spring Cloud Config properties made easy using React
Stars: ✭ 18 (-58.14%)
Mutual labels:  inspector
total
Ruby Gem to get total memory size in the system
Stars: ✭ 15 (-65.12%)
Mutual labels:  memory
cpu monitor
ROS node that publishes all nodes' CPU and memory usage
Stars: ✭ 52 (+20.93%)
Mutual labels:  memory
doc
Get usage and health data about your Node.js process.
Stars: ✭ 17 (-60.47%)
Mutual labels:  memory
floss
Unit-testing for those hard to reach places
Stars: ✭ 26 (-39.53%)
Mutual labels:  coverage
OpenAmiga600RamExpansion
Open Hardware 1 MB Chip RAM Expansion for the Commodore Amiga 600 Computer
Stars: ✭ 48 (+11.63%)
Mutual labels:  memory
nxdk-rdt
Remote Dev Tool is a tool to remote control an Xbox using memory access and RPC
Stars: ✭ 23 (-46.51%)
Mutual labels:  memory
mem usage ui
Measuring and graphing memory usage of local processes
Stars: ✭ 124 (+188.37%)
Mutual labels:  memory

GitHub release GitHub license

CI pipeline Code coverage Opened issues Opened PR DeepScan grade Node version

Purpose

Simple wrapper around "inspector" module. Basically it adds :

  • promises & async/await syntax
  • S3 exporter

Compatibility

Version Supported Tested
16.x yes yes
14.x yes yes
12.x yes yes
10.x yes yes

In order to have all features we recommend to use at least Node.js version 10 or higher.

Installation

$ npm install inspector-api --save

Usage

CPU profiling

const Inspector = require('inspector-api')
const inspector = new Inspector()

await inspector.profiler.enable()
await inspector.profiler.start()
// Invoke business logic under measurement here...

// some time later...
await inspector.profiler.stop()

Memory sampling

const Inspector = require('inspector-api')
const inspector = new Inspector()

await inspector.heap.enable()
await inspector.heap.startSampling()
// Invoke business logic under measurement here...

// some time later...
await inspector.heap.stopSampling()

Memory snapshot

const Inspector = require('inspector-api')
const inspector = new Inspector()

await inspector.heap.takeSnapshot()

Code coverage

const Inspector = require('inspector-api')
const inspector = new Inspector()

await inspector.profiler.enable()
await inspector.profiler.startPreciseCoverage({ callCount: true, detailed: true })

const data = await inspector.profiler.takePreciseCoverage()
await inspector.profiler.stopPreciseCoverage()

Use S3 exporter

const Inspector = require('inspector-api')
const inspector = new Inspector({
    storage: {
        type: 's3',
        bucket: 'testBucket',
        dir: 'inspector'
    }
})

await inspector.profiler.enable()
await inspector.profiler.start()
// Invoke business logic under measurement here...

// some time later...
await inspector.profiler.stop()

Warning: it seems that the new AWS SDK leads to unexpected error if you use the takeSnapshot method (you should use memory sampling)

Constructor's config

new inspector([config])

config.storage

Option description Default value
type Storage type (raw, s3 or fs) raw
bucket S3 bucket's name none
dir Directory where to store the file none

If you use fs, the generated data will be store on the disk in your default tmp directory. You can display it in Node.js with the command require('os').tmpdir()

Test

$ npm test

Coverage report can be found in coverage/.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].