From 4a3405afec696b2a947b1ac45e6fdd8dc6e46cea Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 6 Jun 2023 12:28:27 +0200 Subject: [PATCH] comment the stats method --- index-scheduler/src/index_mapper/mod.rs | 2 +- index-scheduler/src/lib.rs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/index-scheduler/src/index_mapper/mod.rs b/index-scheduler/src/index_mapper/mod.rs index e5bac4d30..8754e7168 100644 --- a/index-scheduler/src/index_mapper/mod.rs +++ b/index-scheduler/src/index_mapper/mod.rs @@ -91,7 +91,7 @@ pub struct IndexStats { /// Size taken up by the index' DB, in bytes. /// /// This includes the size taken by both the used and free pages of the DB, and as the free pages - /// are not returned to the disk after a deletion, this number is typically larger than + /// are not returned to the disk after a deletion, this number is typically larger than /// `used_database_size` that only includes the size of the used pages. pub database_size: u64, /// Size taken by the used pages of the index' DB, in bytes. diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index c27546c8e..40570c668 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -743,6 +743,10 @@ impl IndexScheduler { Ok(tasks) } + /// The returned structure contains: + /// 1. The name of the property being observed can be `statuses`, `types`, or `indexes`. + /// 2. The name of the specific data related to the property can be `enqueued` for the `statuses`, `settingsUpdate` for the `types`, or the name of the index for the `indexes`, for example. + /// 3. The number of times the properties appeared. pub fn get_stats(&self) -> Result>> { let rtxn = self.read_txn()?;