mirror of
https://github.com/house-of-vanity/furumi.git
synced 2025-07-06 05:04:08 +00:00
Metrix.
This commit is contained in:
@ -140,6 +140,20 @@ pub struct MemFS {
|
||||
ttl: Duration,
|
||||
dir_handles: Mutex<Slab<Arc<Mutex<DirHandle>>>>,
|
||||
cfg: config::Config,
|
||||
metrix: Metrix,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct Metrix {
|
||||
rx: u64,
|
||||
}
|
||||
|
||||
impl Metrix {
|
||||
fn new() -> Metrix {
|
||||
Metrix{
|
||||
rx: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl MemFS {
|
||||
@ -177,6 +191,7 @@ impl MemFS {
|
||||
dir_handles: Mutex::default(),
|
||||
ttl: Duration::from_secs(60 * 60 * 24),
|
||||
cfg: cfg.clone(),
|
||||
metrix: Metrix::new(),
|
||||
}
|
||||
}
|
||||
|
||||
@ -570,4 +585,4 @@ fn no_entry() -> io::Error {
|
||||
|
||||
fn unknown_error() -> io::Error {
|
||||
io::Error::from_raw_os_error(libc::EIO)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user