aws / aws-iot-device-sdk-python-v2
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,195 units with 5,762 lines of code in units (84.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (108 lines of code)
    • 17 simple units (349 lines of code)
    • 1,175 very simple units (5,305 lines of code)
0% | 0% | 1% | 6% | 92%
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% | 1% | 6% | 92%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
awsiot0% | 0% | 5% | 13% | 81%
awsiot/greengrasscoreipc0% | 0% | 0% | 2% | 97%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def on_protocol_message()
in awsiot/eventstreamrpc.py
32 12 6
def from_payload()
in awsiot/iotjobs.py
33 11 2
def on_connection_setup()
in awsiot/eventstreamrpc.py
43 11 4
def to_payload()
in awsiot/iotjobs.py
19 9 1
def on_connection_shutdown()
in awsiot/eventstreamrpc.py
26 9 3
def _to_payload()
in awsiot/greengrasscoreipc/model.py
17 9 1
def _from_payload()
in awsiot/greengrasscoreipc/model.py
17 9 2
def close()
in awsiot/eventstreamrpc.py
12 8 2
def _handle_error()
in awsiot/eventstreamrpc.py
16 8 3
def __handle_stream_handler()
in awsiot/greengrasscoreipc/clientv2.py
9 8 6
def from_payload()
in awsiot/iotjobs.py
15 7 2
def from_payload()
in awsiot/iotjobs.py
21 7 2
def from_payload()
in awsiot/iotjobs.py
18 6 2
def _on_continuation_message()
in awsiot/eventstreamrpc.py
38 6 6
def __create_stream_handler()
in awsiot/greengrasscoreipc/clientv2.py
21 6 5
def _to_payload()
in awsiot/greengrasscoreipc/model.py
13 6 1
def _from_payload()
in awsiot/greengrasscoreipc/model.py
13 6 2
def _builder()
in awsiot/mqtt_connection_builder.py
58 6 4
def from_payload()
in awsiot/iotshadow.py
18 6 2
def from_payload()
in awsiot/iotshadow.py
18 6 2