You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
518 B
25 lines
518 B
const { Injectable } = require('flitter-di')
|
|
|
|
class SystemMetrics extends Injectable {
|
|
_cpu = 0
|
|
_ram = 0
|
|
_mounts = {}
|
|
|
|
cpu(set = false) {
|
|
if ( set !== false ) this._cpu = set
|
|
else return this._cpu
|
|
}
|
|
|
|
ram(set = false) {
|
|
if ( set !== false ) this._ram = set
|
|
else return this._ram
|
|
}
|
|
|
|
mount(point, set = false) {
|
|
if ( set !== false ) this._mounts[point] = set
|
|
else return this._mounts[point]
|
|
}
|
|
}
|
|
|
|
module.exports = exports = SystemMetrics
|