All Projects → hyj1991 → V8 Profiler Next

hyj1991 / V8 Profiler Next

Licence: mit
node bindings for the v8 profiler

Labels

Projects that are alternatives of or similar to V8 Profiler Next

Redux Ship
Side effects with snapshots for Redux.
Stars: ✭ 615 (+598.86%)
Mutual labels:  snapshot
Pm2.5 Idw Map
PM2.5 IDW Map from PM2.5 open data portal
Stars: ✭ 14 (-84.09%)
Mutual labels:  snapshot
Odiff
The fastest pixel-by-pixel image visual difference tool in the world.
Stars: ✭ 1,173 (+1232.95%)
Mutual labels:  snapshot
Scaleway Cli
Command Line Interface for Scaleway
Stars: ✭ 654 (+643.18%)
Mutual labels:  snapshot
Concise Ipython Notebooks For Deep Learning
Ipython Notebooks for solving problems like classification, segmentation, generation using latest Deep learning algorithms on different publicly available text and image data-sets.
Stars: ✭ 23 (-73.86%)
Mutual labels:  snapshot
Jsdom Screenshot
📸 Take screenshots of jsdom with puppeteer
Stars: ✭ 39 (-55.68%)
Mutual labels:  snapshot
Solidarity
Solidarity is an environment checker for project dependencies across multiple machines.
Stars: ✭ 540 (+513.64%)
Mutual labels:  snapshot
Aws Maintenance
Collection of scripts and Lambda functions used for maintaining AWS resources
Stars: ✭ 75 (-14.77%)
Mutual labels:  snapshot
Preact Jest Snapshot Test Boilerplate
🚀 Test Preact components using Jest snapshots
Stars: ✭ 24 (-72.73%)
Mutual labels:  snapshot
Abide
📸 A Go testing utility for http response snapshots.
Stars: ✭ 71 (-19.32%)
Mutual labels:  snapshot
Polo
Polo travels through your database and creates sample snapshots so you can work with real world data in development.
Stars: ✭ 695 (+689.77%)
Mutual labels:  snapshot
Playbook Ios
📘A library for isolated developing UI components and automatically taking snapshots of them.
Stars: ✭ 830 (+843.18%)
Mutual labels:  snapshot
Moosefs
MooseFS – Open Source, Petabyte, Fault-Tolerant, Highly Performing, Scalable Network Distributed File System (Software-Defined Storage)
Stars: ✭ 1,025 (+1064.77%)
Mutual labels:  snapshot
Sirix
SirixDB is a temporal, evolutionary database system, which uses an accumulate only approach. It keeps the full history of each resource. Every commit stores a space-efficient snapshot through structural sharing. It is log-structured and never overwrites data. SirixDB uses a novel page-level versioning approach called sliding snapshot.
Stars: ✭ 638 (+625%)
Mutual labels:  snapshot
Syrupy
🥞 The sweeter pytest snapshot plugin
Stars: ✭ 73 (-17.05%)
Mutual labels:  snapshot
Btrbk
Tool for creating snapshots and remote backups of btrfs subvolumes
Stars: ✭ 605 (+587.5%)
Mutual labels:  snapshot
Collectionviewpaginglayout
a simple but highly customizable paging layout for UICollectionView.
Stars: ✭ 947 (+976.14%)
Mutual labels:  snapshot
Babel Test
An opinionated library to make testing babel plugins easier.
Stars: ✭ 79 (-10.23%)
Mutual labels:  snapshot
Cv4pve Barc
Backup And Restore Ceph for Proxmox VE
Stars: ✭ 74 (-15.91%)
Mutual labels:  snapshot
Backintime
Back In Time - A simple backup tool for Linux
Stars: ✭ 1,066 (+1111.36%)
Mutual labels:  snapshot

v8-profiler-next

npm version Package Quality linux build status windows build status downloads info license

Description

v8-profiler-next provides node bindings for the v8 profiler.

I. Quick Start

  • Compatibility
    • node version: v4.x ~ v14.x
    • platform: mac, linux, windows

take cpu profile

'use strict';
const v8Profiler = require('v8-profiler-next');
const title = 'good-name';
// ex. 5 mins cpu profile
v8Profiler.startProfiling(title, true);
setTimeout(() => {
  const profile = v8Profiler.stopProfiling(title);
  profile.export(function (error, result) {
    // if it doesn't have the extension .cpuprofile then
    // chrome's profiler tool won't like it.
    // examine the profile:
    //   Navigate to chrome://inspect
    //   Click Open dedicated DevTools for Node
    //   Select the profiler tab
    //   Load your file
    fs.writeFileSync(`${title}.cpuprofile`, result);
    profile.delete();
  });
}, 5 * 60 * 1000);

take heapsnapshot

'use strict';
const v8Profiler = require('v8-profiler-next');
const snapshot = v8Profiler.takeSnapshot();
// 1. not as stream
snapshot.export(function (error, result) {
	if (error){
		console.error(error);
		return;
	}
	console.log(result);
	snapshot.delete();
});
// 2. as stream
const transform = snapshot.export();
transform.pipe(process.stdout);
transform.on('finish', snapshot.delete.bind(snapshot));

take allocation profile

Attention: If node version < v12.x, please use sampling heap profiling alone without cpu profiling or taking snapshot.

'use strict';
const v8Profiler = require('v8-profiler-next');
// set a leak array
const arraytest = [];
setInterval(() => {
  arraytest.push(new Array(1e2).fill('*').join());
}, 20);
// start 1min sampling profile
v8Profiler.startSamplingHeapProfiling();
setTimeout(() => {
	// stop and get allocation profile
	const profile = v8Profiler.stopSamplingHeapProfiling();
	// upload shf.heapprofile into chrome dev tools -> Memory -> ALLOCATION PRODILES
  require('fs').writeFileSync('./shf.heapprofile', JSON.stringify(profile));
	console.log(profile);
}, 60 * 1000);

II. License

MIT License

Copyright (c) 2018 team of v8-profiler, hyj1991

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].