📈 Updates system metric charts

This commit is contained in:
Rune Harlyk
2024-08-02 18:29:36 +02:00
parent 0854061e36
commit 10c0e28ecd
2 changed files with 16 additions and 19 deletions
+5
View File
@@ -5,6 +5,7 @@ let analytics_data = {
uptime: <number[]>[],
free_heap: <number[]>[],
total_heap: <number[]>[],
used_heap: <number[]>[],
min_free_heap: <number[]>[],
max_alloc_heap: <number[]>[],
fs_used: <number[]>[],
@@ -30,6 +31,10 @@ function createAnalytics() {
total_heap: [...analytics_data.total_heap, content.total_heap / 1000].slice(
-maxAnalyticsData
),
used_heap: [
...analytics_data.used_heap,
(content.total_heap - content.free_heap) / 1000
].slice(-maxAnalyticsData),
min_free_heap: [...analytics_data.min_free_heap, content.min_free_heap / 1000].slice(
-maxAnalyticsData
),