From e1aa7b1bb675d52d507c9f427005e7d1d9566ac9 Mon Sep 17 00:00:00 2001 From: glyph Date: Tue, 25 Jan 2022 11:39:28 +0200 Subject: [PATCH] add sbot docs and bump version --- peach-stats/Cargo.toml | 2 +- peach-stats/README.md | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/peach-stats/Cargo.toml b/peach-stats/Cargo.toml index 488d637..a715323 100644 --- a/peach-stats/Cargo.toml +++ b/peach-stats/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "peach-stats" -version = "0.2.0" +version = "0.3.0" authors = ["Andrew Reid "] edition = "2018" description = "Query system statistics. Provides a wrapper around the probes and systemstat crates." diff --git a/peach-stats/README.md b/peach-stats/README.md index 1245532..9ea56ce 100644 --- a/peach-stats/README.md +++ b/peach-stats/README.md @@ -1,10 +1,10 @@ # peach-stats -![Generic badge](https://img.shields.io/badge/version-0.2.0-.svg) +![Generic badge](https://img.shields.io/badge/version-0.3.0-.svg) System statistics library for PeachCloud. Provides a wrapper around the [probes](https://crates.io/crates/probes) and [systemstat](https://crates.io/crates/systemstat) crates. -Currently offers the following statistics and associated data structures: +Currently offers the following system statistics and associated data structures: - CPU: `user`, `system`, `nice`, `idle` (as values or percentages) - Disk usage: `filesystem`, `one_k_blocks`, `one_k_blocks_used`, @@ -13,10 +13,14 @@ Currently offers the following statistics and associated data structures: - Memory: `total`, `free`, `used` - Uptime: `seconds` +As well as the following go-sbot process statistics: + + - Sbot: `state`, `memory`, `uptime`, `downtime` + ## Example Usage ```rust -use peach_stats::{stats, StatsError}; +use peach_stats::{sbot, stats, StatsError}; fn main() -> Result<(), StatsError> { let cpu = stats::cpu_stats()?; @@ -25,6 +29,7 @@ fn main() -> Result<(), StatsError> { let load = stats::load_average()?; let mem = stats::mem_stats()?; let uptime = stats::uptime()?; + let sbot_process = sbot::sbot_stats()?; // do things with the retrieved values...