Fix the benchmark tests

This commit is contained in:
Clément Renault 2024-11-19 10:45:27 +01:00
parent aba8a0e9e0
commit 3cf1352ae1
No known key found for this signature in database
GPG key ID: F250A4C4E3AE5F5F
6 changed files with 919 additions and 398 deletions

View file

@ -12,7 +12,7 @@ use crate::{DocumentId, Result};
#[derive(Default)]
pub struct DocumentDeletion {
pub to_delete: RoaringBitmap,
to_delete: RoaringBitmap,
}
impl DocumentDeletion {
@ -26,11 +26,11 @@ impl DocumentDeletion {
pub fn into_changes<'indexer>(
self,
indexer: &'indexer Bump,
indexer_alloc: &'indexer Bump,
primary_key: PrimaryKey<'indexer>,
) -> DocumentDeletionChanges<'indexer> {
let to_delete: bumpalo::collections::Vec<_> =
self.to_delete.into_iter().collect_in(indexer);
self.to_delete.into_iter().collect_in(indexer_alloc);
let to_delete = to_delete.into_bump_slice();

View file

@ -107,6 +107,12 @@ impl<'pl> DocumentOperation<'pl> {
}
}
impl Default for DocumentOperation<'_> {
fn default() -> Self {
DocumentOperation::new(IndexDocumentsMethod::default())
}
}
#[allow(clippy::too_many_arguments)]
fn extract_addition_payload_changes<'r, 'pl: 'r>(
indexer: &'pl Bump,