prom-client
Advanced tools
Comparing version 4.0.0 to 4.1.0
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53860
24
1142