facebookresearch / dachshund
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 245 units with 2,507 lines of code in units (49.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (289 lines of code)
    • 14 simple units (525 lines of code)
    • 226 very simple units (1,693 lines of code)
0% | 0% | 11% | 20% | 67%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
rs0% | 0% | 11% | 20% | 67%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/dachshund/algorithms0% | 0% | 21% | 37% | 40%
src/dachshund0% | 0% | 5% | 10% | 84%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
fn _get_connected_components_membership()
in src/dachshund/algorithms/connected_components.rs
50 18 3
fn one_step_search()
in src/dachshund/beam.rs
82 15 3
fn _get_k_trusses()
in src/dachshund/algorithms/coreness.rs
70 14 3
fn get_brokerage_scores_for_node()
in src/dachshund/algorithms/brokerage.rs
41 13 3
fn get_shortest_paths()
in src/dachshund/algorithms/shortest_paths.rs
46 11 3
fn get_node_betweenness_starting_from_sources()
in src/dachshund/algorithms/betweenness.rs
30 9 4
fn get_node_betweenness_brandes()
in src/dachshund/algorithms/betweenness.rs
30 9 1
fn trim_edges()
in src/dachshund/typed_graph_builder.rs
29 9 2
fn get_line_processor()
in src/dachshund/transformer_base.rs
62 9 1
fn get_shortest_paths_bfs()
in src/dachshund/algorithms/shortest_paths.rs
38 8 2
fn cmp()
in src/dachshund/algorithms/cnm_communities.rs
17 7 2
fn is_acyclic()
in src/dachshund/simple_directed_graph.rs
18 6 1
fn get_strongly_connected_components()
in src/dachshund/algorithms/connected_components.rs
39 6 1
fn init_cnm_communities()
in src/dachshund/algorithms/cnm_communities.rs
57 6 1
fn iterate_cnm_communities()
in src/dachshund/algorithms/cnm_communities.rs
89 6 2
fn get_coreness_values()
in src/dachshund/algorithms/coreness.rs
42 6 1
fn get_fractional_coreness_values()
in src/dachshund/algorithms/coreness.rs
25 6 1
fn pre_process_rows()
in src/dachshund/typed_graph_builder.rs
32 6 2
fn count_ties_with_ids()
in src/dachshund/node.rs
17 6 2
fn enumerate_shortest_paths()
in src/dachshund/algorithms/shortest_paths.rs
29 5 4