Compute the size of the auth-controller, index-scheduler and all update files in the global stats

This commit is contained in:
Tamo 2023-01-24 16:17:23 +01:00
parent b3c2a4ae27
commit c92948b143
8 changed files with 67 additions and 22 deletions

View file

@ -452,6 +452,10 @@ impl IndexScheduler {
&self.index_mapper.indexer_config
}
pub fn size(&self) -> Result<u64> {
Ok(self.env.real_disk_size()?)
}
/// Return the index corresponding to the name.
///
/// * If the index wasn't opened before, the index will be opened.
@ -898,6 +902,11 @@ impl IndexScheduler {
Ok(self.file_store.new_update_with_uuid(uuid)?)
}
/// List the update files contained in the IndexScheduler.
pub fn update_file_size(&self) -> Result<u64> {
Ok(self.file_store.update_total_size()?)
}
/// Delete a file from the index scheduler.
///
/// Counterpart to the [`create_update_file`](IndexScheduler::create_update_file) method.