aws-samples / aws-greengrass-mini-fulfillment
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 280 units with 4,210 lines of code in units (68.5% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (196 lines of code)
    • 3 medium complex units (92 lines of code)
    • 29 simple units (909 lines of code)
    • 247 very simple units (3,013 lines of code)
0% | 4% | 2% | 21% | 71%
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
js0% | 44% | 8% | 16% | 31%
py0% | 0% | 1% | 22% | 76%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
groups/master/ggd/flask0% | 44% | 8% | 16% | 31%
groups/arm/ggd0% | 0% | 5% | 27% | 67%
groups/master/ggd/servo0% | 0% | 0% | 29% | 70%
groups/arm/ggd/servo0% | 0% | 0% | 29% | 70%
groups/lambda/MasterBrain0% | 0% | 0% | 100% | 0%
groups/master/ggd0% | 0% | 0% | 11% | 88%
groups0% | 0% | 0% | 0% | 100%
groups/lambda/ArmErrorDetector0% | 0% | 0% | 0% | 100%
groups/lambda/MasterErrorDetector0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
SmoothieChart.prototype.render = function()
in groups/master/ggd/flask/static/smoothie.js
196 46 2
def polar_goals()
in groups/arm/ggd/stages.py
24 13 2
SmoothieChart.prototype.updateValueRange = function()
in groups/master/ggd/flask/static/smoothie.js
38 12 0
def merge_overlapping_pixel_objects()
in groups/arm/ggd/image_processor.py
30 11 1
TimeSeries.prototype.append = function()
in groups/master/ggd/flask/static/smoothie.js
22 10 3
def goal_position()
in groups/master/ggd/servo/servode.py
36 10 5
def bulk_read()
in groups/master/ggd/servo/servode.py
56 10 2
def goal_position()
in groups/arm/ggd/servo/servode.py
36 10 5
def bulk_read()
in groups/arm/ggd/servo/servode.py
56 10 2
def stage_pick()
in groups/arm/ggd/stages.py
59 9 5
def identify_pixel_objects()
in groups/arm/ggd/image_processor.py
29 9 2
def handle_button()
in groups/lambda/MasterBrain/master_brain.py
61 9 1
def handler()
in groups/lambda/MasterBrain/master_brain.py
26 9 2
def get_conn_info()
in groups/master/ggd/utils.py
10 8 2
SmoothieChart.prototype.resize = function()
in groups/master/ggd/flask/static/smoothie.js
19 8 0
def write_register()
in groups/master/ggd/servo/servode.py
37 8 4
def get_conn_info()
in groups/arm/ggd/utils.py
10 8 2
def write_register()
in groups/arm/ggd/servo/servode.py
37 8 4
def ggc_discovery()
in groups/master/ggd/utils.py
37 7 4
extend: function()
in groups/master/ggd/flask/static/smoothie.js
22 7 0