aws-samples / aws-connected-mobility-solution-telemetry-device-demo
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 64 units with 447 lines of code in units (76.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (130 lines of code)
    • 7 small units (93 lines of code)
    • 53 very small units (224 lines of code)
0% | 0% | 29% | 20% | 50%
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% | 29% | 20% | 50%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 0% | 29% | 20% | 50%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def discoverBroker()
in GreengrassAwareConnection.py
46 9 1
def do_something()
in telemetryThing.py
35 8 0
def __init__()
in GreengrassAwareConnection.py
25 1 8
def connect()
in GreengrassAwareConnection.py
24 4 1
def publishMessageOnTopic()
in GreengrassAwareConnection.py
18 7 4
def connectShadow()
in GreengrassAwareConnection.py
15 2 1
def _fetchFileFromURI()
in FileReader.py
14 3 1
def getSample()
in FileReader.py
12 4 1
def dot_expand()
in MessagePayload.py
12 4 3
def open()
in FileReader.py
11 5 1
def getTimestampMS()
in telemetryThing.py
11 2 1
def updateShadow()
in GreengrassAwareConnection.py
10 3 2
def __init__()
in MessagePayload.py
10 3 4
def run()
in telemetryThing.py
10 6 0
def __init__()
in FileReader.py
8 1 6
def useFileURI()
in FileReader.py
8 3 2
def getFileURI()
in FileReader.py
8 2 1
def _makeSample()
in FileReader.py
8 4 2
def notifyObservers()
in Observer.py
8 3 2
def deltaHandler()
in GreengrassAwareConnection.py
8 2 4