facebookresearch / OctConv
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 118 units with 1,832 lines of code in units (87.9% of code).
    • 1 very complex units (265 lines of code)
    • 1 complex units (61 lines of code)
    • 8 medium complex units (394 lines of code)
    • 12 simple units (344 lines of code)
    • 96 very simple units (768 lines of code)
14% | 3% | 21% | 18% | 41%
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
py14% | 3% | 21% | 18% | 41%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
gluon51% | 0% | 18% | 0% | 29%
gluon/utils0% | 6% | 21% | 28% | 44%
symbol0% | 0% | 26% | 21% | 52%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main()
in utils/gluon/train_imagenet.py
265 57 0
def __init__()
in utils/gluon/utils/octconv.py
61 43 5
def Convolution()
in utils/symbol/symbol_octconv.py
24 25 5
def get_before_pool()
in utils/symbol/symbol_resnetv2.py
63 20 6
def __init__()
in utils/gluon/utils/resnetv1.py
46 16 14
def main()
in utils/gluon/score.py
97 15 0
def __init__()
in utils/gluon/utils/resnetv1.py
69 14 9
def __init__()
in utils/gluon/utils/resnetv2.py
37 11 12
def __init__()
in utils/gluon/utils/mobilenetv2.py
45 11 9
def FullyConnected()
in utils/symbol/symbol_octconv.py
13 11 4
def __init__()
in utils/gluon/utils/resnetv2.py
57 10 9
def __init__()
in utils/gluon/utils/mobilenetv2.py
24 9 9
def get_before_pool()
in utils/symbol/symbol_densenet.py
29 9 3
def score()
in utils/symbol/score.py
42 9 10
def _make_layer()
in utils/gluon/utils/resnetv2.py
16 8 8
def __init__()
in utils/gluon/utils/densenet.py
47 8 10
def __init__()
in utils/gluon/utils/mobilenetv1.py
35 8 8
def __init__()
in utils/gluon/utils/resnetv1.py
33 8 11
def _make_layer()
in utils/gluon/utils/resnetv1.py
18 8 8
def __init__()
in utils/gluon/utils/octconv.py
16 7 5