You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

performance-nodejs

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

performance-nodejs - npm Package Compare versions

Comparing version

to
1.0.2

9

index.js
'use strict';
/* eslint import/no-unresolved: 0 */
const v8 = require('v8');
const util = require('util');
const MB = 1024 * 1024;

@@ -11,3 +13,4 @@ const GB = MB * 1204;

const delta = process.hrtime(start);
const nanosec = delta[0] * 1e9 + delta[1];
const nanosec = (delta[0] * 1e9) + delta[1];
/* eslint no-bitwise: ["error", { "int32Hint": true }] */
return Math.max((nanosec / 1e6 | 0) - interval, 0);

@@ -39,3 +42,3 @@ }

const result = {};
keys.forEach(key => {
keys.forEach((key) => {
result[key] = format(data[key], unit);

@@ -48,3 +51,3 @@ });

let result;
arr.forEach(tmp => {
arr.forEach((tmp) => {
if (tmp && filter(tmp)) {

@@ -51,0 +54,0 @@ result = tmp;

{
"name": "performance-nodejs",
"description": "get nodejs performance, such as: heap statistics, event loop delay",
"version": "1.0.1",
"author": "Tree Xie <vicansocanbico@gmail.com>",
"keywords": [
"performance",
"heap",
"heap statistics",
"event loop"
],
"scripts": {
"test": "node ./node_modules/.bin/eslint ./index.js && node ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha ./test/*.js --"
},
"repository": {
"name": "performance-nodejs",
"description": "get nodejs performance, such as: heap statistics, event loop delay",
"version": "1.0.2",
"author": "Tree Xie <vicansocanbico@gmail.com>",
"keywords": [
"performance",
"heap",
"heap statistics",
"event loop"
],
"scripts": {
"test": "node ./node_modules/.bin/eslint ./index.js && node ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha ./test/*.js --"
},
"repository": {
"type": "git",

@@ -24,9 +24,11 @@ "url": "https://github.com/vicanso/performance-nodejs.git"

"devDependencies": {
"eslint": "^2.9.0",
"eslint-config-airbnb": "^8.0.0",
"eslint-plugin-import": "^1.6.1",
"istanbul": "^0.4.3",
"mocha": "^2.4.5"
"eslint": "^3.6.1",
"eslint-config-airbnb": "^12.0.0",
"eslint-plugin-import": "^1.16.0",
"eslint-plugin-jsx-a11y": "^2.2.2",
"eslint-plugin-react": "^6.3.0",
"istanbul": "^0.4.5",
"mocha": "^2.5.3"
},
"license": "MIT"
"license": "MIT"
}