aws-samples / sagemaker-documentdb-train-gnn-for-millions-proteins
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 38 units with 375 lines of code in units (37.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (24 lines of code)
    • 1 simple units (14 lines of code)
    • 36 very simple units (337 lines of code)
0% | 0% | 6% | 3% | 89%
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% | 6% | 3% | 89%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 26% | 0% | 73%
src0% | 0% | 0% | 4% | 95%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
24 12 5
14 6 1
def main()
in src/main.py
59 5 1
def __iter__()
in src/dataset.py
29 5 1
def step()
in src/helpers.py
15 4 3
def __iter__()
in src/dataset.py
12 4 1
def setup()
in src/helpers.py
8 3 2
8 3 1
def __init__()
in src/helpers.py
12 2 3
def roc_auc_score()
in src/helpers.py
11 2 1
def convert_to_graph()
in src/dataset.py
11 2 2
9 2 2
def gunzip_to_ram()
in pdb_parse.py
7 2 1
4 2 1
def __init__()
in src/model.py
7 1 4
def _conv_forward()
in src/model.py
7 1 2
def forward()
in src/model.py
4 1 2
def attention_scores()
in src/model.py
8 1 2
def save_checkpoint()
in src/helpers.py
2 1 2
def load_checkpoint()
in src/helpers.py
2 1 2