pub struct MemoryAccumulator { /* private fields */ }Expand description
Counts memory used by buffers of Arrow arrays and RecordBatches.
This is meant to capture how much memory is being used by the Arrow data structures as they are. It does not represent the memory used if the data were to be serialized and then deserialized. In particular:
- This does not double count memory used by buffers shared by multiple arrays or batches. Round-tripped data may use more memory because of this.
- This counts the total size of the buffers, even if the array is a slice. Round-tripped data may use less memory because of this.
Implementations§
Source§impl MemoryAccumulator
impl MemoryAccumulator
pub fn record_array(&mut self, array: &dyn Array)
pub fn record_batch(&mut self, batch: &RecordBatch)
pub fn total(&self) -> usize
Trait Implementations§
Source§impl Default for MemoryAccumulator
impl Default for MemoryAccumulator
Source§fn default() -> MemoryAccumulator
fn default() -> MemoryAccumulator
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MemoryAccumulator
impl RefUnwindSafe for MemoryAccumulator
impl Send for MemoryAccumulator
impl Sync for MemoryAccumulator
impl Unpin for MemoryAccumulator
impl UnwindSafe for MemoryAccumulator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more