Skip to content
This repository was archived by the owner on Dec 15, 2025. It is now read-only.

Commit 8f86ed4

Browse files
committed
feat: Add CPU and memory usage to service status
- Extend the service status to include CPU and memory usage. - This provides more comprehensive monitoring capabilities.
1 parent ea28584 commit 8f86ed4

File tree

7 files changed

+678
-191
lines changed

7 files changed

+678
-191
lines changed

src/app/api.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ pub struct Status {
3232
pub state: String,
3333
pub target: String,
3434
pub after: HashMap<String, String>,
35+
pub memory_kb: u64,
36+
pub cpu_percent: f64,
3537
}
3638

3739
pub struct Api {
@@ -224,6 +226,8 @@ impl Api {
224226
}
225227
after
226228
},
229+
memory_kb: status.memory_kb,
230+
cpu_percent: status.cpu_percent,
227231
};
228232

229233
Ok(encoder::to_value(result)?)

0 commit comments

Comments
 (0)