awslabs / mxboard
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 90 units with 765 lines of code in units (47.6% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (59 lines of code)
    • 2 medium complex units (82 lines of code)
    • 6 simple units (103 lines of code)
    • 81 very simple units (521 lines of code)
0% | 7% | 10% | 13% | 68%
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% | 7% | 10% | 13% | 68%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
python/mxboard0% | 8% | 11% | 5% | 73%
tools0% | 0% | 0% | 96% | 3%
python0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def make_image_grid()
in python/mxboard/utils.py
59 27 8
def _get_nodes_from_symbol()
in python/mxboard/summary.py
46 21 1
def add_embedding()
in python/mxboard/writer.py
36 13 6
def _prepare_image()
in python/mxboard/utils.py
24 10 4
def _make_metadata_tsv()
in python/mxboard/utils.py
16 8 2
def process_file()
in tools/license_header.py
21 7 3
def process_folder()
in tools/license_header.py
15 7 2
def _get_license()
in tools/license_header.py
16 6 1
def _valid_file()
in tools/license_header.py
11 6 2
def flush()
in python/mxboard/event_file_writer.py
8 5 1
def _is_2D_matrix()
in python/mxboard/utils.py
4 5 1
def _save_embedding_tsv()
in python/mxboard/utils.py
12 5 2
def add_summary()
in python/mxboard/writer.py
14 5 3
def run()
in python/mxboard/event_file_writer.py
14 4 1
def _make_numpy_array()
in python/mxboard/utils.py
10 4 1
def _add_embedding_config()
in python/mxboard/utils.py
20 4 4
def _clean_tag()
in python/mxboard/summary.py
8 4 1
def audio_summary()
in python/mxboard/summary.py
25 4 3
def _net2pb()
in python/mxboard/summary.py
11 4 1
def add_scalar()
in python/mxboard/writer.py
12 4 4