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

process-reporter

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

process-reporter - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

index.js

@@ -90,3 +90,3 @@ 'use strict';

self.requestTimer =
self.timers.setTimeout(onHandle, self.handleInterval);
self.timers.setTimeout(onRequest, self.requestInterval);
}

@@ -93,0 +93,0 @@

{
"name": "process-reporter",
"version": "1.1.0",
"version": "1.1.1",
"description": "process reporter",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -55,1 +55,50 @@ 'use strict';

});
test('processReporter prefix', function t(assert) {
var fakeStatsd = {
records: [],
timing: function timing(key, value) {
this.records.push({
key: key,
value: value,
type: 'timing'
});
},
gauge: function gauge(key, value) {
this.records.push({
key: key,
value: value,
type: 'gauge'
});
}
};
var reporter = processReporter({
handleInterval: 10,
requestInterval: 10,
statsd: fakeStatsd,
prefix: 'foobarbaz'
});
reporter.bootstrap();
setTimeout(onReported, 15);
function onReported() {
reporter.destroy();
var records = fakeStatsd.records;
var handles = records[0];
var requests = records[1];
assert.equal(records.length, 2);
assert.equal(handles.key, 'foobarbaz.process-reporter.handles');
assert.equal(requests.key, 'foobarbaz.process-reporter.requests');
assert.equal(typeof handles.value, 'number');
assert.equal(typeof requests.value, 'number');
reporter.destroy();
assert.end();
}
});
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