Add cellulite database sizes

This commit is contained in:
Mubelotix
2025-08-18 14:30:20 +02:00
committed by Tamo
parent e45e98ba3f
commit 4a098e56fe

View File

@ -1970,6 +1970,16 @@ impl Index {
sizes.insert("embedder_category_id", embedder_category_id.stat(rtxn).map(compute_size)?); sizes.insert("embedder_category_id", embedder_category_id.stat(rtxn).map(compute_size)?);
sizes.insert("documents", documents.stat(rtxn).map(compute_size)?); sizes.insert("documents", documents.stat(rtxn).map(compute_size)?);
// Cellulite
const _CELLULITE_DB_CHECK: () = {
if Cellulite::nb_dbs() != 3 {
panic!("Cellulite database count has changed, please update the code accordingly.")
}
};
sizes.insert("cellulite_item", self.cellulite.item_db_stats(rtxn).map(compute_size)?);
sizes.insert("cellulite_cell", self.cellulite.cell_db_stats(rtxn).map(compute_size)?);
sizes.insert("cellulite_update", self.cellulite.update_db_stats(rtxn).map(compute_size)?);
Ok(sizes) Ok(sizes)
} }
} }