srcgraph-metrics
Graph-theoretic code-analysis metrics over the srcgraph-core traits — SCC, LCOM4, betweenness centrality, instability, Halstead, cyclomatic, entropy, clone detection, association rules, process mining.
Algorithms are generic over petgraph::Graph<N, E> where N: ClassNode, E: EdgeKind, so
you can run them against an OwnedGraph loaded from GraphML or against a live in-process
graph (e.g. yah's kg-store::Store::class_graph()).
use ;
let graph = from_graphml_file?;
let scc = compute_scc;
let bet = compute_betweenness;
Benchmarks against networkx on a 7000+ node graph land in the 50× range (cargo bench -p srcgraph-metrics --bench betweenness).
License: MIT OR Apache-2.0.