Skip to content

Commit

Permalink
Expose memory usage in SingleSegmentIndexWriter (#1508)
Browse files Browse the repository at this point in the history
  • Loading branch information
fulmicoton committed Sep 7, 2022
1 parent 1f3d8ca commit 4d634d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/single_segment_index_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ impl SingleSegmentIndexWriter {
})
}

pub fn mem_usage(&self) -> usize {
self.segment_writer.mem_usage()
}

pub fn add_document(&mut self, document: Document) -> crate::Result<()> {
let opstamp = self.opstamp;
self.opstamp += 1;
Expand Down

0 comments on commit 4d634d6

Please sign in to comment.