aws-solutions / aws-devops-monitoring-dashboard
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 121 units with 2,425 lines of code in units (64.7% of code).
    • 4 very long units (1,195 lines of code)
    • 1 long units (85 lines of code)
    • 13 medium size units (423 lines of code)
    • 19 small units (309 lines of code)
    • 84 very small units (413 lines of code)
49% | 3% | 17% | 12% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts80% | 5% | 11% | 1% | 1%
py0% | 0% | 23% | 33% | 42%
js0% | 0% | 65% | 0% | 34%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/lib100% | 0% | 0% | 0% | 0%
source/lib/database100% | 0% | 0% | 0% | 0%
source/lib/deployment-helper89% | 0% | 10% | 0% | 0%
source/lib/events61% | 0% | 38% | 0% | 0%
source/lib/quicksight-custom-resources0% | 87% | 0% | 0% | 12%
source/lambda/quicksight-custom-resources0% | 0% | 24% | 32% | 42%
source/lambda/query_runner0% | 0% | 79% | 0% | 20%
source/lib/solution-helper0% | 0% | 63% | 31% | 5%
source/lambda/solution_helper0% | 0% | 0% | 60% | 40%
source/lambda/event_parser0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in source/lib/aws_devops_monitoring_dashboard_stack.ts
493 9 3
constructor()
in source/lib/database/database_construct.ts
273 1 3
constructor()
in source/lib/deployment-helper/canary_alarm.ts
272 2 3
constructor()
in source/lib/events/code_build_events_construct.ts
157 2 3
private createCustomResource()
in source/lib/quicksight-custom-resources/quicksight-construct.ts
85 1 1
await deletePartitionForUpdate()
in source/lambda/query_runner/index.js
49 13 2
def __init__()
in source/lambda/quicksight-custom-resources/util/quicksight_application.py
46 4 2
constructor()
in source/lib/events/canary_events_construct.ts
45 1 3
def custom_resource_update()
in source/lambda/quicksight-custom-resources/lambda_function.py
41 14 2
constructor()
in source/lib/solution-helper/solution-helper-construct.ts
38 1 3
constructor()
in source/lib/deployment-helper/alarm_construct.ts
33 3 3
def custom_resource_create()
in source/lambda/quicksight-custom-resources/lambda_function.py
29 8 2
constructor()
in source/lib/events/code_pipeline_events_construct.ts
26 1 3
constructor()
in source/lib/events/code_deploy_events_construct.ts
26 1 3
def _create_data_set()
in source/lambda/quicksight-custom-resources/util/dataset.py
24 3 3
def custom_resource_delete()
in source/lambda/quicksight-custom-resources/lambda_function.py
24 7 2
def create()
in source/lambda/quicksight-custom-resources/util/datasource.py
21 2 1
def _update_source_entity()
in source/lambda/quicksight-custom-resources/util/source_entity.py
21 2 2
def create()
in source/lambda/quicksight-custom-resources/util/analysis.py
20 3 1
constructor()
in source/lib/solution-helper/lambda-role-cloudwatch-construct.ts
19 2 3