aws-cloudformation / aws-cloudformation-samples
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 33 units with 267 lines of code in units (11.9% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (108 lines of code)
    • 1 medium size units (22 lines of code)
    • 2 small units (36 lines of code)
    • 28 very small units (101 lines of code)
0% | 40% | 8% | 13% | 37%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 57% | 11% | 19% | 11%
py0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
resource-types/typescript-example-website-monitor/src0% | 57% | 11% | 19% | 11%
resource-types/awssamples-ec2-importkeypair/python/src/awssamples_ec2_importkeypair0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public async create()
in resource-types/typescript-example-website-monitor/src/handlers.ts
56 7 4
public async update()
in resource-types/typescript-example-website-monitor/src/handlers.ts
52 8 4
public async delete()
in resource-types/typescript-example-website-monitor/src/handlers.ts
22 3 4
public async read()
in resource-types/typescript-example-website-monitor/src/handlers.ts
19 2 4
private async checkResponse()
in resource-types/typescript-example-website-monitor/src/handlers.ts
17 6 3
public getPrimaryIdentifier()
in resource-types/typescript-example-website-monitor/src/models.ts
7 3 0
public getAdditionalIdentifiers()
in resource-types/typescript-example-website-monitor/src/models.ts
7 3 0
public getIdentifier_Name()
in resource-types/typescript-example-website-monitor/src/models.ts
7 3 0
def _callback_helper()
in resource-types/awssamples-ec2-importkeypair/python/src/awssamples_ec2_importkeypair/handlers.py
6 1 0
def _progress_event_success()
in resource-types/awssamples-ec2-importkeypair/python/src/awssamples_ec2_importkeypair/handlers.py
5 1 0
def create_handler()
in resource-types/awssamples-ec2-importkeypair/python/src/awssamples_ec2_importkeypair/handlers.py
4 1 0
def update_handler()
in resource-types/awssamples-ec2-importkeypair/python/src/awssamples_ec2_importkeypair/handlers.py
4 1 0
def delete_handler()
in resource-types/awssamples-ec2-importkeypair/python/src/awssamples_ec2_importkeypair/handlers.py
4 1 0
def read_handler()
in resource-types/awssamples-ec2-importkeypair/python/src/awssamples_ec2_importkeypair/handlers.py
4 1 0
def list_handler()
in resource-types/awssamples-ec2-importkeypair/python/src/awssamples_ec2_importkeypair/handlers.py
4 1 0
def _progress_event_failed()
in resource-types/awssamples-ec2-importkeypair/python/src/awssamples_ec2_importkeypair/handlers.py
4 1 0
def _update_tags_helper()
in resource-types/awssamples-ec2-importkeypair/python/src/awssamples_ec2_importkeypair/handlers.py
4 1 0
def set_or_none()
in resource-types/awssamples-ec2-importkeypair/python/src/awssamples_ec2_importkeypair/models.py
4 2 1
def _get_session_client()
in resource-types/awssamples-ec2-importkeypair/python/src/awssamples_ec2_importkeypair/handlers.py
3 1 0
def _build_tag_list()
in resource-types/awssamples-ec2-importkeypair/python/src/awssamples_ec2_importkeypair/handlers.py
3 1 0