MCPcopy Create free account
hub / github.com/apache/datafusion / meta_heap_bytes

Function meta_heap_bytes

datafusion/execution/src/cache/list_files_cache.rs:125–136  ·  view source on GitHub ↗

Calculates the number of bytes an [`ObjectMeta`] occupies in the heap.

(object_meta: &ObjectMeta)

Source from the content-addressed store, hash-verified

123
124/// Calculates the number of bytes an [`ObjectMeta`] occupies in the heap.
125fn meta_heap_bytes(object_meta: &ObjectMeta) -> usize {
126 let mut size = object_meta.location.as_ref().len();
127
128 if let Some(e) = &object_meta.e_tag {
129 size += e.len();
130 }
131 if let Some(v) = &object_meta.version {
132 size += v.len();
133 }
134
135 size
136}
137
138/// The default memory limit for the [`DefaultListFilesCache`]
139pub const DEFAULT_LIST_FILES_CACHE_MEMORY_LIMIT: usize = 1024 * 1024; // 1MiB

Callers

nothing calls this directly

Calls 2

lenMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…