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

Method stats

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

Get statistics about this graph.

(&self)

Source from the content-addressed store, hash-verified

354
355 /// Get statistics about this graph.
356 pub fn stats(&self) -> GraphStats {
357 let mut zombie_count = 0;
358 let mut empty_count = 0;
359
360 for v in &self.vertices {
361 if v.is_zombie() {
362 zombie_count += 1;
363 }
364 if v.is_empty() {
365 empty_count += 1;
366 }
367 }
368
369 GraphStats {
370 vertex_count: self.vertices.len(),
371 child_count: self.children.len(),
372 total_bytes: self.total_bytes,
373 zombie_count,
374 empty_vertex_count: empty_count,
375 }
376 }
377
378 /// Clear the graph, removing all vertices and children.
379 ///

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