pub struct MemoryNode {
pub id: Option<u64>,
pub absolute_name: Option<String>,
pub weak: Option<bool>,
pub size_bytes: Option<u64>,
pub entries: Vec<MemoryNodeEntry>,
}Expand description
Memory dumps are represented as a graph of memory nodes which contain statistics. To avoid double counting the same memory across different nodes, edges are used to mark nodes that account for the same memory. See this doc for examples of the usage: https://docs.google.com/document/d/1WGQRJ1sjJrfVkNcgPVY6frm64UqPc94tsxUOXImZUZI
A single node in the memory graph.
Fields§
§id: Option<u64>Unique ID of the node across all processes involved in the global memory dump. The ID is only unique within this particular global dump identified by GlobalMemoryDumpPacket.global_dump_id.
absolute_name: Option<String>Absolute name is a unique name for the memory node within the process with ProcessMemoryDump.pid. The name can contain multiple parts separated by ‘/’, which traces the edges of the node from the root node. Eg: “partition_allocator/array_buffers/buffer1” refers to the child node “buffer1” in a graph structure of: root -> partition_allocator -> array_buffers -> buffer1.
weak: Option<bool>A weak node means that the instrumentation that added the current node is unsure about the existence of the actual memory. Unless a “strong” (non-weak is default) node that has an edge to the current node exists in the current global dump, the current node will be discarded.
size_bytes: Option<u64>Size of the node in bytes, used to compute the effective size of the nodes without double counting.
entries: Vec<MemoryNodeEntry>Implementations§
Source§impl MemoryNode
impl MemoryNode
Sourcepub fn absolute_name(&self) -> &str
pub fn absolute_name(&self) -> &str
Returns the value of absolute_name, or the default value if absolute_name is unset.
Sourcepub fn size_bytes(&self) -> u64
pub fn size_bytes(&self) -> u64
Returns the value of size_bytes, or the default value if size_bytes is unset.
Trait Implementations§
Source§impl Clone for MemoryNode
impl Clone for MemoryNode
Source§impl Debug for MemoryNode
impl Debug for MemoryNode
Source§impl Default for MemoryNode
impl Default for MemoryNode
Source§impl Message for MemoryNode
impl Message for MemoryNode
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.