Improve the performances of computing the size of the documents database

This commit is contained in:
Kerollmops 2025-03-26 17:13:09 +01:00
parent 9ce7ccfbe7
commit db7ce03763
No known key found for this signature in database
GPG key ID: F250A4C4E3AE5F5F
6 changed files with 33 additions and 88 deletions

View file

@ -518,7 +518,7 @@ impl From<index_scheduler::IndexStats> for IndexStats {
.inner_stats
.number_of_documents
.unwrap_or(stats.inner_stats.documents_database_stats.number_of_entries()),
raw_document_db_size: stats.inner_stats.documents_database_stats.total_value_size(),
raw_document_db_size: stats.inner_stats.documents_database_stats.total_size(),
avg_document_size: stats.inner_stats.documents_database_stats.average_value_size(),
is_indexing: stats.is_indexing,
number_of_embeddings: stats.inner_stats.number_of_embeddings,