Skip to main content

MemoryReport

Struct MemoryReport 

Source
pub struct MemoryReport {
Show 19 fields pub live_node_count: usize, pub live_relationship_count: usize, pub node_tombstone_count: usize, pub relationship_tombstone_count: usize, pub nodes_bytes: usize, pub relationships_bytes: usize, pub outgoing_bytes: usize, pub incoming_bytes: usize, pub label_index_bytes: usize, pub type_index_bytes: usize, pub property_index_bytes: usize, pub sorted_index_bytes: usize, pub text_index_bytes: usize, pub point_index_bytes: usize, pub fulltext_index_bytes: usize, pub vector_index_bytes: usize, pub index_catalog_bytes: usize, pub constraint_catalog_bytes: usize, pub property_index_keys: Vec<PropertyIndexKeyUsage>,
}
Expand description

Aggregated retained-heap breakdown of an [InMemoryGraph].

All fields are in bytes. usize was chosen over u64 so call sites can use cargo bench reports and pretty-print without casts; on 32-bit hosts a graph that overflowed this would already have failed earlier.

Fields§

§live_node_count: usize§live_relationship_count: usize§node_tombstone_count: usize§relationship_tombstone_count: usize§nodes_bytes: usize

nodes: Vec<Option<Arc<NodeRecord>>> — slot vector plus the Arc headers plus deep payload of each live record (labels, properties — see property_value_heap_bytes).

§relationships_bytes: usize

relationships: Vec<Option<Arc<RelationshipRecord>>>.

§outgoing_bytes: usize

outgoing: Vec<Vec<RelationshipId>> — outer Vec capacity plus the sum of each inner Vec’s capacity in bytes.

§incoming_bytes: usize

Same for incoming.

§label_index_bytes: usize

nodes_by_label: BTreeMap<String, ChunkedVec<NodeId>>.

§type_index_bytes: usize

relationships_by_type: BTreeMap<String, ChunkedVec<RelationshipId>>.

§property_index_bytes: usize

Hash-bucket property registry (find_*_by_property).

§sorted_index_bytes: usize

Sorted-range property index (RANGE catalog entries).

§text_index_bytes: usize

Trigram TEXT indexes.

§point_index_bytes: usize

Spatial grid POINT indexes.

§fulltext_index_bytes: usize

FULLTEXT inverted indexes.

§vector_index_bytes: usize

VECTOR indexes (Flat and HNSW backends).

§index_catalog_bytes: usize§constraint_catalog_bytes: usize§property_index_keys: Vec<PropertyIndexKeyUsage>

Per-key breakdown of Self::property_index_bytes: one entry per active hash property index (node and relationship keys), with whether a declaration keeps it active. Implicit (declared == false) entries were built by an equality lookup on an undeclared key; they are not listed by SHOW INDEXES, live until the process exits, and are not rebuilt on restart (the next lookup builds them again). Sorted by entity, then key.

Implementations§

Source§

impl MemoryReport

Source

pub fn graph_core_bytes(&self) -> usize

Bytes attributable to the core graph shape: slabs, adjacency, and the label/type indexes. This is the floor every workload pays regardless of which secondary indexes are installed.

Source

pub fn secondary_index_bytes(&self) -> usize

Bytes attributable to secondary indexes — the amount that would be reclaimed by dropping every index.

Source

pub fn implicit_property_index_keys( &self, ) -> impl Iterator<Item = &PropertyIndexKeyUsage>

Active hash property index keys that no declaration covers.

Source

pub fn implicit_property_index_bytes(&self) -> usize

Estimated bytes held by implicit (lookup-activated) hash property indexes: the part of Self::property_index_bytes nothing declared.

Source

pub fn catalog_bytes(&self) -> usize

Source

pub fn total_bytes(&self) -> usize

Source

pub fn bytes_per_live_node(&self) -> f64

Average retained bytes per live node, including its share of the slab tombstone overhead. Returns 0 when there are no nodes.

Source

pub fn bytes_per_live_relationship(&self) -> f64

Source

pub fn summary(&self) -> String

One-line breakdown for bench / probe output. Stable enough for grep-friendly snapshot diffs across runs.

Trait Implementations§

Source§

impl Clone for MemoryReport

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MemoryReport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MemoryReport

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for MemoryReport

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for MemoryReport

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for MemoryReport

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for MemoryReport

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.