mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 15:33:12 +09:00
Add resident memory and heap size metrics
Implement the default resident memory and heap size metrics.
This commit is contained in:
1 parent
e908c5069b
commit
56488b2c2d
2 files changed
+60
No files matched your search
@@ -409,6 +409,26 @@ defaultCollectors.processCpuSecondsTotal = new Gauge(
|
||||
},
|
||||
);
|
||||
|
||||
defaultCollectors.processResidentMemoryBytes = new Gauge(
|
||||
'process_resident_memory_bytes',
|
||||
"Resident memory size in bytes.",
|
||||
{
|
||||
callback: function() {
|
||||
this.set(process.memoryUsage().rss);
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
defaultCollectors.processHeapBytes = new Gauge(
|
||||
'process_heap_bytes',
|
||||
"Process heap size in bytes.",
|
||||
{
|
||||
callback: function() {
|
||||
this.set(process.memoryUsage().heapUsed);
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
defaultCollectors.processStartTimeSeconds = new Gauge(
|
||||
'process_start_time_seconds',
|
||||
"Start time of the process since unix epoch in seconds."
|
||||
|
||||
Reference in new issue
Block a user