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