Skip to content

Commit

Permalink
track memory arena memory usage
Browse files Browse the repository at this point in the history
  • Loading branch information
PSeitz committed Aug 16, 2023
1 parent 62ece86 commit 09b4159
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/aggregation/bucket/term_agg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1269,6 +1269,7 @@ mod tests {
];

let index = get_test_index_from_terms(false, &terms_per_segment)?;
assert_eq!(index.searchable_segments().unwrap().len(), 2);

let agg_req: Aggregations = serde_json::from_value(json!({
"my_texts": {
Expand Down
2 changes: 1 addition & 1 deletion stacker/src/arena_hashmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ impl ArenaHashMap {

#[inline]
pub fn mem_usage(&self) -> usize {
self.table.len() * mem::size_of::<KeyValue>()
self.table.len() * mem::size_of::<KeyValue>() + self.memory_arena.mem_usage()
}

#[inline]
Expand Down

0 comments on commit 09b4159

Please sign in to comment.