Skip to main content

MemoryReport

Struct MemoryReport 

Source
pub struct MemoryReport {
Show 18 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,
}
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

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 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) -> MemoryReport

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<(), Error>

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

impl Default for MemoryReport

Source§

fn default() -> MemoryReport

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

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

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<MemoryReport, <__D as Deserializer<'de>>::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: &MemoryReport) -> 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 as Serializer>::Ok, <__S as Serializer>::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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more