aws / aws-iot-device-sdk-python
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 445 units with 3,465 lines of code in units (87.0% of code).
    • 0 very long units (0 lines of code)
    • 7 long units (504 lines of code)
    • 32 medium size units (958 lines of code)
    • 48 small units (695 lines of code)
    • 358 very small units (1,308 lines of code)
0% | 14% | 27% | 20% | 37%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 14% | 27% | 20% | 37%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
AWSIoTPythonSDK/core/protocol/paho0% | 28% | 39% | 19% | 11%
AWSIoTPythonSDK/core/protocol/connection0% | 14% | 27% | 21% | 36%
AWSIoTPythonSDK/core/shadow0% | 0% | 36% | 27% | 36%
AWSIoTPythonSDK/core/greengrass/discovery0% | 0% | 26% | 19% | 53%
AWSIoTPythonSDK/core/protocol0% | 0% | 17% | 25% | 56%
AWSIoTPythonSDK/core/protocol/internal0% | 0% | 5% | 19% | 74%
AWSIoTPythonSDK/core/jobs0% | 0% | 0% | 56% | 43%
AWSIoTPythonSDK0% | 0% | 0% | 0% | 100%
AWSIoTPythonSDK/exception0% | 0% | 0% | 0% | 100%
AWSIoTPythonSDK/core/util0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def reconnect()
in AWSIoTPythonSDK/core/protocol/paho/client.py
86 26 1
def _handle_connack()
in AWSIoTPythonSDK/core/protocol/paho/client.py
82 21 1
def __init__()
in AWSIoTPythonSDK/core/protocol/paho/client.py
79 7 6
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 _packet_write()
in AWSIoTPythonSDK/core/protocol/paho/client.py
62 19 1
def publish()
in AWSIoTPythonSDK/core/protocol/paho/client.py
54 23 5
def topic_matches_sub()
in AWSIoTPythonSDK/core/protocol/paho/client.py
45 28 2
def loop()
in AWSIoTPythonSDK/core/protocol/paho/client.py
43 18 3
def _handle_publish()
in AWSIoTPythonSDK/core/protocol/paho/client.py
42 7 1
def loop_forever()
in AWSIoTPythonSDK/core/protocol/paho/client.py
41 21 4
def _send_connect()
in AWSIoTPythonSDK/core/protocol/paho/client.py
41 12 3
def generalCallback()
in AWSIoTPythonSDK/core/shadow/deviceShadow.py
40 22 4
def _send_publish()
in AWSIoTPythonSDK/core/protocol/paho/client.py
39 13 7
def _handShake()
in AWSIoTPythonSDK/core/protocol/connection/cores.py
36 9 3
def error_string()
in AWSIoTPythonSDK/core/protocol/paho/client.py
33 16 1
def tls_set()
in AWSIoTPythonSDK/core/protocol/paho/client.py
33 9 7
def _handle_pubackcomp()
in AWSIoTPythonSDK/core/protocol/paho/client.py
32 9 2
def _check_keepalive()
in AWSIoTPythonSDK/core/protocol/paho/client.py
30 11 1
def createWebsocketEndpoint()
in AWSIoTPythonSDK/core/protocol/connection/cores.py
30 8 7