microsoft / MMdnn
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 1,438 units with 14,156 lines of code in units (81.5% of code).
    • 1 very complex units (356 lines of code)
    • 3 complex units (222 lines of code)
    • 33 medium complex units (1,493 lines of code)
    • 99 simple units (2,615 lines of code)
    • 1,302 very simple units (9,470 lines of code)
2% | 1% | 10% | 18% | 66%
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
py2% | 1% | 10% | 19% | 65%
tsx0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
mmdnn/conversion/darknet39% | 0% | 13% | 13% | 32%
mmdnn/conversion/_script0% | 16% | 24% | 4% | 54%
mmdnn/conversion/mxnet0% | 5% | 16% | 19% | 58%
mmdnn/conversion/coreml0% | 4% | 16% | 35% | 43%
mmdnn/conversion/tensorflow0% | 0% | 8% | 19% | 71%
mmdnn/conversion/caffe0% | 0% | 9% | 22% | 68%
mmdnn/conversion/keras0% | 0% | 8% | 5% | 86%
mmdnn/conversion/paddle0% | 0% | 30% | 33% | 35%
mmdnn/conversion/rewriter0% | 0% | 20% | 40% | 39%
mmdnn/conversion/common0% | 0% | 15% | 11% | 72%
mmdnn/conversion/onnx0% | 0% | 6% | 9% | 84%
mmdnn/conversion/pytorch0% | 0% | 3% | 19% | 76%
mmdnn/conversion/cntk0% | 0% | 0% | 21% | 78%
mmdnn/conversion/torch0% | 0% | 0% | 23% | 76%
requirements0% | 0% | 0% | 100% | 0%
mmdnn/vis_edit/src0% | 0% | 0% | 0% | 100%
mmdnn/models0% | 0% | 0% | 0% | 100%
mmdnn/visualization0% | 0% | 0% | 0% | 100%
mmdnn/visualization/public0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def build()
in mmdnn/conversion/darknet/darknet_graph.py
356 54 1
def build()
in mmdnn/conversion/coreml/coreml_graph.py
54 41 1
def _convert()
in mmdnn/conversion/_script/convertToIR.py
97 31 1
def gen_code()
in mmdnn/conversion/mxnet/mxnet_emitter.py
71 26 2
def process_train_proto()
in mmdnn/conversion/caffe/graph.py
41 24 1
def _convert_padding()
in mmdnn/conversion/coreml/coreml_parser.py
106 22 2
def rename_Conv()
in mmdnn/conversion/paddle/paddle_parser.py
52 22 2
def print_cfg_nicely()
in mmdnn/conversion/darknet/cfg.py
120 20 1
def _emit_convolution()
in mmdnn/conversion/mxnet/mxnet_emitter.py
78 20 3
def _get_scope_name_dict()
in mmdnn/conversion/rewriter/folder.py
39 20 6
def __init__()
in mmdnn/conversion/tensorflow/tensorflow_parser.py
66 20 6
def emit_Pool()
in mmdnn/conversion/keras/keras2_emitter.py
64 18 3
def _convert()
in mmdnn/conversion/_script/IRToCode.py
48 17 1
def extract_model()
in mmdnn/conversion/_script/extractModel.py
46 17 1
def emit_Pool()
in mmdnn/conversion/tensorflow/tensorflow_emitter.py
56 17 2
def download_file()
in mmdnn/conversion/common/utils.py
46 15 6
def gen_IR()
in mmdnn/conversion/coreml/coreml_parser.py
35 15 1
def _convert_convolution()
in mmdnn/conversion/keras/keras2_parser.py
43 15 3
def rename_Convolution()
in mmdnn/conversion/mxnet/mxnet_parser.py
58 15 2
def Conv()
in mmdnn/conversion/onnx/shape_inference.py
25 15 8