Skip to content

Commit

Permalink
Add numeric metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
idrissneumann committed Sep 11, 2024
1 parent 5731e2c commit f258fb4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.0
4.0.1
12 changes: 11 additions & 1 deletion src/utils/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ def virtual_memory():
"used": used,
"available": available,
"percent": percent_used,
"numeric": {
"total": mem.total,
"available": mem.available,
"used": mem.used
}
}

def swap_memory():
Expand All @@ -40,7 +45,12 @@ def swap_memory():
"total": bytes2human(sw.total),
"used": bytes2human(sw.used),
"free": bytes2human(sw.free),
"percent": sw.percent
"percent": sw.percent,
"numeric": {
"total": sw.total,
"used": sw.used,
"free": sw.free
}
}

def cpu():
Expand Down

0 comments on commit f258fb4

Please sign in to comment.