MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / stats

Method stats

atomic-core/src/output/alive/graph.rs:379–399  ·  view source on GitHub ↗

Get statistics about this graph.

(&self)

Source from the content-addressed store, hash-verified

377
378 /// Get statistics about this graph.
379 pub fn stats(&self) -> GraphStats {
380 let mut zombie_count = 0;
381 let mut empty_count = 0;
382
383 for v in &self.vertices {
384 if v.is_zombie() {
385 zombie_count += 1;
386 }
387 if v.is_empty() {
388 empty_count += 1;
389 }
390 }
391
392 GraphStats {
393 vertex_count: self.vertices.len(),
394 child_count: self.children.len(),
395 total_bytes: self.total_bytes,
396 zombie_count,
397 empty_vertex_count: empty_count,
398 }
399 }
400
401 /// Clear the graph, removing all vertices and children.
402 ///

Callers 3

test_graph_stats_emptyFunction · 0.45

Calls 3

is_zombieMethod · 0.45
is_emptyMethod · 0.45
lenMethod · 0.45

Tested by 3

test_graph_stats_emptyFunction · 0.36