awslabs / aws-greengrass-labs-telemetry-influxdbpublisher
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 13 units with 163 lines of code in units (63.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (90 lines of code)
    • 2 small units (37 lines of code)
    • 8 very small units (36 lines of code)
0% | 0% | 55% | 22% | 22%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 55% | 22% | 22%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 0% | 55% | 22% | 22%
Alternative Visuals
Longest Units
Top 13 longest units
Unit# linesMcCabe index# params
def retrieve_influxdb_params()
in src/influxDBTelemetryPublisher.py
45 13 2
def __init__()
in src/streamHandlers.py
24 3 2
def relay_telemetry()
in src/influxDBTelemetryPublisher.py
21 5 1
def publish_token_request()
in src/influxDBTelemetryPublisher.py
20 4 2
def on_stream_event()
in src/streamHandlers.py
17 4 2
def createPoints()
in src/streamHandlers.py
10 3 2
def on_stream_event()
in src/streamHandlers.py
8 3 2
def parse_arguments()
in src/influxDBTelemetryPublisher.py
5 1 0
def __init__()
in src/streamHandlers.py
3 1 1
def on_stream_error()
in src/streamHandlers.py
3 1 2
def on_stream_error()
in src/streamHandlers.py
3 1 2
def on_stream_closed()
in src/streamHandlers.py
2 1 1
def on_stream_closed()
in src/streamHandlers.py
2 1 1