aws-solutions / serverless-transit-network-orchestrator
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 261 units with 3,771 lines of code in units (78.9% of code).
    • 0 very long units (0 lines of code)
    • 5 long units (318 lines of code)
    • 57 medium size units (1,622 lines of code)
    • 77 small units (1,160 lines of code)
    • 122 very small units (671 lines of code)
0% | 8% | 43% | 30% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 50% | 26% | 6% | 16%
py0% | 0% | 46% | 35% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/ui/src/Components0% | 71% | 8% | 3% | 16%
source0% | 0% | 54% | 26% | 18%
source/lib0% | 0% | 31% | 50% | 17%
source/ui/src0% | 0% | 80% | 0% | 19%
source/aws/services0% | 0% | 60% | 33% | 6%
source/scripts/build_scripts0% | 0% | 62% | 0% | 37%
source/ui/src/graphql0% | 0% | 100% | 0% | 0%
deployment/manifest-generator0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in source/ui/src/Components/Action/Action.js
72 1 1
constructor()
in source/ui/src/Components/Dashboard/Dashboard.js
65 2 1
constructor()
in source/ui/src/Components/Action/VersionHistoryModal.js
61 3 1
render()
in source/ui/src/Components/Action/ConfirmAcceptModal.js
60 1 0
render()
in source/ui/src/Components/Action/ConfirmRejectModal.js
60 1 0
48 3 4
def _find_existing_default_route()
in source/state_machine_handler.py
45 12 3
def describe_transit_gateway_peering_attachments()
in source/aws/services/transit_gateway_peering_attachments.py
44 3 3
def _set_approval_flag()
in source/state_machine_handler.py
39 19 2
37 3 5
def put_item()
in source/state_machine_handler.py
37 5 1
render()
in source/ui/src/Components/Action/VersionHistoryModal.js
37 1 0
def send()
in source/lib/crhelper.py
35 9 7
def tgw_peering_attachment_id_finder()
in source/tgw_peering_attachment_handler.py
35 9 3
def describe_resources()
in source/state_machine_handler.py
34 11 1
def default_route_crud_operations()
in source/state_machine_handler.py
34 6 1
def notify()
in source/state_machine_handler.py
34 9 1
def _describe_vpc()
in source/state_machine_handler.py
33 10 1
function registerValidSW()
in source/ui/src/serviceWorker.js
33 8 2
def create()
in source/lambda_custom_resource.py
31 5 2