Skip to main content

parse_snapshot

Function parse_snapshot 

Source
pub fn parse_snapshot(
    path: &str,
    text: &str,
) -> Result<BTreeMap<String, ProcessSample>, BudgetError>
Expand description

Parse a resource snapshot: blocks that each open with pod=<name>.

Keys this function does not need, such as fd_count or the network counters, are kept in the raw artifact and skipped here.

ยงErrors

Returns BudgetError::InvalidArtifact for a key outside a pod block, a pod named twice, or a pod without cpu_ticks, process_start_ticks or rss_hwm_kib.