aws / aws-iot-device-sdk-python
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 445 units with 3,465 lines of code in units (87.0% of code).
    • 0 very complex units (0 lines of code)
    • 4 complex units (272 lines of code)
    • 16 medium complex units (597 lines of code)
    • 30 simple units (683 lines of code)
    • 395 very simple units (1,913 lines of code)
0% | 7% | 17% | 19% | 55%
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% | 17% | 19% | 55%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
AWSIoTPythonSDK/core/protocol/paho0% | 13% | 35% | 27% | 22%
AWSIoTPythonSDK/core/protocol/connection0% | 14% | 0% | 37% | 47%
AWSIoTPythonSDK/core/shadow0% | 0% | 17% | 0% | 82%
AWSIoTPythonSDK/core/jobs0% | 0% | 25% | 30% | 43%
AWSIoTPythonSDK/core/greengrass/discovery0% | 0% | 0% | 17% | 82%
AWSIoTPythonSDK/core/protocol/internal0% | 0% | 0% | 6% | 93%
AWSIoTPythonSDK/core/protocol0% | 0% | 0% | 0% | 100%
AWSIoTPythonSDK0% | 0% | 0% | 0% | 100%
AWSIoTPythonSDK/exception0% | 0% | 0% | 0% | 100%
AWSIoTPythonSDK/core/util0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _packet_read()
in AWSIoTPythonSDK/core/protocol/paho/client.py
76 35 1
def read()
in AWSIoTPythonSDK/core/protocol/connection/cores.py
65 32 2
def topic_matches_sub()
in AWSIoTPythonSDK/core/protocol/paho/client.py
45 28 2
def reconnect()
in AWSIoTPythonSDK/core/protocol/paho/client.py
86 26 1
def publish()
in AWSIoTPythonSDK/core/protocol/paho/client.py
54 23 5
def subscribe()
in AWSIoTPythonSDK/core/protocol/paho/client.py
27 22 3
def generalCallback()
in AWSIoTPythonSDK/core/shadow/deviceShadow.py
40 22 4
def loop_forever()
in AWSIoTPythonSDK/core/protocol/paho/client.py
41 21 4
def _handle_connack()
in AWSIoTPythonSDK/core/protocol/paho/client.py
82 21 1
def _packet_write()
in AWSIoTPythonSDK/core/protocol/paho/client.py
62 19 1
def loop()
in AWSIoTPythonSDK/core/protocol/paho/client.py
43 18 3
def error_string()
in AWSIoTPythonSDK/core/protocol/paho/client.py
33 16 1
def getJobTopic()
in AWSIoTPythonSDK/core/jobs/thingJobManager.py
17 14 4
def _send_publish()
in AWSIoTPythonSDK/core/protocol/paho/client.py
39 13 7
def _send_connect()
in AWSIoTPythonSDK/core/protocol/paho/client.py
41 12 3
def connect_async()
in AWSIoTPythonSDK/core/protocol/paho/client.py
17 11 5
def unsubscribe()
in AWSIoTPythonSDK/core/protocol/paho/client.py
19 11 2
def loop_misc()
in AWSIoTPythonSDK/core/protocol/paho/client.py
27 11 1
def _check_keepalive()
in AWSIoTPythonSDK/core/protocol/paho/client.py
30 11 1
def _packet_handle()
in AWSIoTPythonSDK/core/protocol/paho/client.py
25 11 1