aws / aws-iot-device-sdk-python-v2
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 1,195 units with 5,762 lines of code in units (84.3% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (58 lines of code)
    • 14 medium size units (410 lines of code)
    • 60 small units (804 lines of code)
    • 1,120 very small units (4,490 lines of code)
0% | 1% | 7% | 13% | 77%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 1% | 7% | 13% | 77%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
awsiot0% | 2% | 18% | 30% | 47%
awsiot/greengrasscoreipc0% | 0% | 1% | 5% | 93%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _builder()
in awsiot/mqtt_connection_builder.py
58 6 4
def discover()
in awsiot/greengrass_discovery.py
44 4 2
def on_connection_setup()
in awsiot/eventstreamrpc.py
43 11 4
def _on_continuation_message()
in awsiot/eventstreamrpc.py
38 6 6
def from_payload()
in awsiot/iotjobs.py
33 11 2
def on_protocol_message()
in awsiot/eventstreamrpc.py
32 12 6
def _subscribe_operation()
in awsiot/__init__.py
29 4 6
def connect()
in awsiot/eventstreamrpc.py
28 3 2
def connect()
in awsiot/greengrasscoreipc/__init__.py
27 5 5
def __init__()
in awsiot/greengrass_discovery.py
26 4 6
def on_connection_shutdown()
in awsiot/eventstreamrpc.py
26 9 3
def _publish_operation()
in awsiot/__init__.py
21 4 4
def from_payload()
in awsiot/iotjobs.py
21 7 2
def __create_stream_handler()
in awsiot/greengrasscoreipc/clientv2.py
21 6 5
def websockets_with_default_aws_signing()
in awsiot/mqtt_connection_builder.py
21 3 4
def _handle_data()
in awsiot/eventstreamrpc.py
20 5 3
def to_payload()
in awsiot/iotjobs.py
19 9 1
def mtls_with_pkcs11()
in awsiot/mqtt_connection_builder.py
19 1 9
def from_payload()
in awsiot/iotjobs.py
18 6 2
def from_payload()
in awsiot/iotshadow.py
18 6 2