aws-samples / rekognition-identity-verification
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 292 units with 2,881 lines of code in units (71.8% of code).
    • 1 very long units (170 lines of code)
    • 6 long units (391 lines of code)
    • 29 medium size units (865 lines of code)
    • 39 small units (537 lines of code)
    • 217 very small units (918 lines of code)
5% | 13% | 30% | 18% | 31%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py5% | 13% | 30% | 18% | 31%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
infra/userportal21% | 41% | 15% | 6% | 15%
src/bulk-loader0% | 12% | 28% | 17% | 41%
src/rekognition0% | 0% | 45% | 27% | 26%
infra0% | 0% | 32% | 15% | 52%
infra/bulkloader0% | 0% | 65% | 8% | 25%
infra/services0% | 0% | 38% | 33% | 28%
src/textract0% | 0% | 19% | 20% | 59%
src/test-client0% | 0% | 36% | 57% | 5%
infra/storage0% | 0% | 34% | 29% | 35%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def __init__()
in infra/userportal/gateway/models.py
170 1 4
def __init__()
in infra/userportal/states/register_idcard.py
88 1 6
def __init__()
in infra/userportal/states/update.py
71 1 6
def process_message_record()
in src/bulk-loader/inventory-created-handler/handler.py
64 5 1
def __init__()
in infra/userportal/states/auth.py
63 1 6
def __init__()
in infra/userportal/states/register_user.py
54 1 6
def __bind_state_machine()
in infra/userportal/gateway/topology.py
51 1 5
def __init__()
in infra/bulkloader/topology.py
49 1 7
def function_main()
in src/rekognition/compare-faces/handler.py
48 1 3
def __init__()
in infra/bulkloader/throttled_indexer.py
42 1 9
def __init__()
in infra/default_lambda.py
42 1 8
def __init__()
in infra/services/core/backup.py
39 1 5
def function_main()
in src/rekognition/index-faces/handler.py
34 3 3
def __init__()
in infra/userportal/functions/topology.py
34 1 7
def function_main()
in src/rekognition/detect-faces/handler.py
33 8 3
def convert_to_item()
in src/rekognition/index-faces/storage.py
33 2 3
def __init__()
in infra/userportal/topology.py
32 2 6
def __init__()
in infra/topologies.py
31 3 4
def create_collections()
in src/rekognition/setup/app.py
29 4 0
def set_state_machine()
in infra/userportal/states/interfaces.py
29 2 3