microsoft / graspologic
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 409 units with 3,779 lines of code in units (38.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 10 medium complex units (598 lines of code)
    • 28 simple units (716 lines of code)
    • 371 very simple units (2,465 lines of code)
0% | 0% | 15% | 18% | 65%
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
py0% | 0% | 15% | 18% | 65%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
graspologic/layouts0% | 0% | 25% | 12% | 62%
graspologic/cluster0% | 0% | 37% | 41% | 21%
graspologic/embed0% | 0% | 14% | 29% | 56%
graspologic/plot0% | 0% | 5% | 27% | 66%
graspologic/nominate0% | 0% | 18% | 41% | 39%
graspologic/align0% | 0% | 0% | 24% | 75%
graspologic/match0% | 0% | 0% | 18% | 81%
graspologic/models0% | 0% | 0% | 0% | 100%
graspologic/pipeline0% | 0% | 0% | 0% | 100%
graspologic/partition0% | 0% | 0% | 0% | 100%
graspologic/simulations0% | 0% | 0% | 0% | 100%
graspologic/utils0% | 0% | 0% | 0% | 100%
graspologic/preprocessing0% | 0% | 0% | 0% | 100%
graspologic/datasets0% | 0% | 0% | 0% | 100%
graspologic0% | 0% | 0% | 0% | 100%
graspologic/subgraph0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def fit()
in graspologic/cluster/autogmm.py
93 23 3
def layout_quad()
in graspologic/layouts/nooverlap/_quad_node.py
95 16 1
def _do_contraction_with_given_nodes()
in graspologic/layouts/nooverlap/_quad_node.py
88 15 2
def push_to_kids()
in graspologic/layouts/nooverlap/_quad_node.py
42 14 1
def fit()
in graspologic/cluster/gclust.py
67 13 3
def transform()
in graspologic/embed/base.py
27 13 2
def _reduce_dim()
in graspologic/embed/mase.py
57 13 2
def _item_to_df()
in graspologic/plot/plot_matrix.py
27 13 3
def _check_params()
in graspologic/nominate/spectralVN.py
18 12 1
def _do_contraction()
in graspologic/layouts/nooverlap/_quad_node.py
84 11 1
def _fit()
in graspologic/cluster/divisive_cluster.py
67 10 2
55 10 2
def quad_stats()
in graspologic/layouts/nooverlap/_quad_node.py
54 10 1
def sort_meta()
in graspologic/plot/plot_matrix.py
24 10 5
def fit()
in graspologic/align/seedless_procrustes.py
31 9 3
def _relabel()
in graspologic/cluster/divisive_cluster.py
26 9 3
def _cluster_and_decide()
in graspologic/cluster/divisive_cluster.py
34 8 2
def fit()
in graspologic/embed/mds.py
38 8 3
def find_center()
in graspologic/layouts/nooverlap/_quad_node.py
26 8 1
def num_overlapping_across_quads()
in graspologic/layouts/nooverlap/_quad_node.py
20 8 2