mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
Feature/server metrics (#405)
* adds skeleton structure to task runners * finishes server metrics * Apply suggestions from code review Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com> * cleans up meminfo call * changes error creation method Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>
This commit is contained in:
committed by
Aiden McClelland
parent
5a13320921
commit
bcb6d9d673
@@ -41,6 +41,7 @@ pub struct RpcContextSeed {
|
||||
pub managers: ManagerMap,
|
||||
pub revision_cache_size: usize,
|
||||
pub revision_cache: RwLock<VecDeque<Arc<Revision>>>,
|
||||
pub metrics_cache: RwLock<Option<crate::system::Metrics>>,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
@@ -103,6 +104,7 @@ impl RpcContext {
|
||||
managers,
|
||||
revision_cache_size: base.revision_cache_size.unwrap_or(512),
|
||||
revision_cache: RwLock::new(VecDeque::new()),
|
||||
metrics_cache: RwLock::new(None),
|
||||
});
|
||||
Ok(Self(seed))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user