Socket
Socket
Sign inDemoInstall

prom-client

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prom-client - npm Package Compare versions

Comparing version 4.0.0 to 4.1.0

lib/metrics/heapSizeAndUsed.js

4

lib/defaultMetrics.js

@@ -11,2 +11,3 @@ 'use strict';

var processRequests = require('./metrics/processRequests');
var heapSizeAndUsed = require('./metrics/heapSizeAndUsed');

@@ -21,3 +22,4 @@ var metrics = {

processHandles: processHandles,
processRequests: processRequests
processRequests: processRequests,
heapSizeAndUsed: heapSizeAndUsed
};

@@ -24,0 +26,0 @@

'use strict';
var Gauge = require('../gauge');
var Counter = require('../counter');

@@ -12,10 +12,12 @@ module.exports = function () {

var cpuUserGauge = new Gauge('process_cpu_seconds_total', 'Total user and system CPU time spent in seconds.');
var cpuUserCounter = new Counter('process_cpu_seconds_total', 'Total user and system CPU time spent in seconds.');
var lastCpuUsage = null;
return function () {
var cpuUsage = process.cpuUsage();
var cpuUsage = process.cpuUsage(lastCpuUsage);
lastCpuUsage = cpuUsage;
var totalUsageMicros = cpuUsage.user + cpuUsage.system;
cpuUserGauge.set(null, totalUsageMicros / 1e6);
cpuUserCounter.inc(totalUsageMicros / 1e6);
};
};

@@ -8,2 +8,3 @@ 'use strict';

var isSet = false;
var fileDescriptorsGauge = new Gauge('process_max_fds', 'Maximum number of open file descriptors.');

@@ -22,4 +23,2 @@ return function () {

var fileDescriptorsGauge = new Gauge('process_max_fds', 'Maximum number of open file descriptors.');
fileDescriptorsGauge.set(null, maxFds);

@@ -26,0 +25,0 @@ });

{
"name": "prom-client",
"version": "4.0.0",
"version": "4.1.0",
"description": "Client for prometheus",

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

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