List indexfiles in directories
This commit is contained in:
@@ -126,6 +126,7 @@ pub struct ArchiverAppliance {
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ChannelArchiver {
|
||||
pub data_base_paths: Vec<PathBuf>,
|
||||
pub database: Database,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
@@ -298,6 +299,12 @@ pub struct Nanos {
|
||||
pub ns: u64,
|
||||
}
|
||||
|
||||
impl Nanos {
|
||||
pub fn from_ns(ns: u64) -> Self {
|
||||
Self { ns }
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for Nanos {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let ts = chrono::Utc.timestamp((self.ns / SEC) as i64, (self.ns % SEC) as u32);
|
||||
@@ -970,6 +977,58 @@ impl RangeFilterStats {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub enum DiskStats {
|
||||
OpenStats(OpenStats),
|
||||
SeekStats(SeekStats),
|
||||
ReadStats(ReadStats),
|
||||
ReadExactStats(ReadExactStats),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct OpenStats {
|
||||
pub duration: Duration,
|
||||
}
|
||||
|
||||
impl OpenStats {
|
||||
pub fn new(duration: Duration) -> Self {
|
||||
Self { duration }
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct SeekStats {
|
||||
pub duration: Duration,
|
||||
}
|
||||
|
||||
impl SeekStats {
|
||||
pub fn new(duration: Duration) -> Self {
|
||||
Self { duration }
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ReadStats {
|
||||
pub duration: Duration,
|
||||
}
|
||||
|
||||
impl ReadStats {
|
||||
pub fn new(duration: Duration) -> Self {
|
||||
Self { duration }
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ReadExactStats {
|
||||
pub duration: Duration,
|
||||
}
|
||||
|
||||
impl ReadExactStats {
|
||||
pub fn new(duration: Duration) -> Self {
|
||||
Self { duration }
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct PerfOpts {
|
||||
pub inmem_bufcap: usize,
|
||||
|
||||
Reference in New Issue
Block a user