Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cluster2

Package Overview
Dependencies
Maintainers
6
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cluster2 - npm Package Compare versions

Comparing version 0.4.9 to 0.4.11

4

lib/monitor.js

@@ -18,7 +18,5 @@ /*

var misc = require('./misc.js'),
express = require('express'),
ejs = require('ejs'),
fs = require('fs'),
util = require('util'),
npm = require('npm'),
os = require('os'),

@@ -35,2 +33,3 @@ _ = require('underscore');

if(!app){
var express = require('express');
app = express.createServer();

@@ -89,2 +88,3 @@

app.get('/deps', function(req, res) {
var npm = require('npm');
npm.load({}, function() {

@@ -91,0 +91,0 @@ npm.commands.ls([], true, function(e, data) {

@@ -190,2 +190,3 @@ /*

'totalDuration': aggr.totalDuration,//total
'errors': aggr.errors,//total
'threads': _.keys(threads).length,

@@ -577,21 +578,30 @@ 'interval': Date.now() - self.lastTime

var errors = 0;
self.emitter.on('errorTransaction', function(){
errors += 1;
});
// Heartbeat - make sure to clear this on 'close'
var heartbeat = setInterval(function () {
var heartbeat = {
'pid': process.pid,
'usertime': getrusage.getcputime(),
'systime': getrusage.getsystemtime(),
'uptime': Math.round(process.uptime()),
'totalmem': os.totalmem(),
'freemem': os.freemem(),
'totalConnections': totalConns,
'pendingConnections': conns,
'timedoutConnections': timedoutConns,
'fullGCs': memStats['num_full_gc'],
'incrementalGCs': memStats['num_inc_gc'],
'heapCompactions': memStats['heap_compactions'],
'totalTransactions': txStats.count,
'totalDuration': txStats.totalDuration
};
var memUsage = process.memoryUsage(),
heartbeat = {
'pid': process.pid,
'usertime': getrusage.getcputime(),
'systime': getrusage.getsystemtime(),
'uptime': Math.round(process.uptime()),
'totalmem': memUsage.heapTotal,
'freemem': memUsage.heapTotal - memUsage.heapUsed,
'totalConnections': totalConns,
'pendingConnections': conns,
'timedoutConnections': timedoutConns,
'fullGCs': memStats['num_full_gc'],
'incrementalGCs': memStats['num_inc_gc'],
'heapCompactions': memStats['heap_compactions'],
'totalTransactions': txStats.count,
'totalDuration': txStats.totalDuration,
'errors': errors
};

@@ -611,2 +621,3 @@ self.emitter.emit('heartbeat', heartbeat);

txStats.totalDuration = 0;
errors = 0;

@@ -613,0 +624,0 @@ }, self.options.heartbeatInterval || 60000);

@@ -8,3 +8,3 @@ {

"name": "cluster2",
"version": "0.4.9",
"version": "0.4.11",
"repository": {

@@ -11,0 +11,0 @@ "type": "git",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc