aws-samples / serverless-samples
File Size

The distribution of size of files (measured in lines of code).

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 73 files with 11,275 lines of code.
    • 1 very long files (1,259 lines of code)
    • 9 long files (5,788 lines of code)
    • 3 medium size files (753 lines of codeclsfd_ftr_w_mp_ins)
    • 9 small files (1,344 lines of code)
    • 51 very small files (2,131 lines of code)
11% | 51% | 6% | 11% | 18%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
yaml16% | 67% | 3% | 8% | 4%
py0% | 29% | 0% | 28% | 41%
js0% | 0% | 40% | 9% | 50%
yml0% | 0% | 0% | 0% | 100%
tf0% | 0% | 0% | 0% | 100%
toml0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
fargate-rest-api/javascript-rest-nlb-ecs-sam35% | 34% | 6% | 8% | 14%
serverless-rest-api/python-rest-sam0% | 64% | 13% | 13% | 9%
serverless-rest-api/python-http-sam0% | 74% | 0% | 9% | 15%
serverless-rest-api/javascript-http-sam0% | 69% | 13% | 6% | 11%
serverless-rest-api/python-http-cdk0% | 51% | 0% | 13% | 34%
serverless-rest-api/shared0% | 0% | 0% | 100% | 0%
apigw-private-custom-domain-name/iac0% | 0% | 0% | 28% | 71%
terraform-sam-integration/sam0% | 0% | 0% | 0% | 100%
apigw-private-custom-domain-name/src0% | 0% | 0% | 0% | 100%
terraform-sam-integration/terraform0% | 0% | 0% | 0% | 100%
lambda-ecs-dual-deploy/3-flask-dual-deployment0% | 0% | 0% | 0% | 100%
lambda-ecs-dual-deploy/2-flask-lambda-container0% | 0% | 0% | 0% | 100%
lambda-ecs-dual-deploy/1-flask-app-container0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
template.yaml
in fargate-rest-api/javascript-rest-nlb-ecs-sam
1259 -
template.yaml
in serverless-rest-api/python-http-sam
786 -
template.yaml
in serverless-rest-api/python-rest-sam
780 -
template.yaml
in serverless-rest-api/javascript-http-sam
779 -
pipeline.yaml
in fargate-rest-api/javascript-rest-nlb-ecs-sam
741 -
serverless_api_stack.py
in serverless-rest-api/python-http-cdk/lib
656 1
pipeline.yaml
in serverless-rest-api/python-rest-sam
521 -
swagger.yaml
in fargate-rest-api/javascript-rest-nlb-ecs-sam
509 -
pipeline.yaml
in serverless-rest-api/python-http-sam
508 -
pipeline.yaml
in serverless-rest-api/javascript-http-sam
508 -
swagger.yaml
in serverless-rest-api/python-rest-sam/src/api
265 -
authorizer.js
in serverless-rest-api/javascript-http-sam/src/api
244 14
authorizer.js
in fargate-rest-api/javascript-rest-nlb-ecs-sam/src/api/authorizer
244 14
cognito.yaml
in serverless-rest-api/shared
184 -
vpc.yaml
in fargate-rest-api/javascript-rest-nlb-ecs-sam
183 -
authorizer.py
in serverless-rest-api/python-http-sam/src/api
172 13
authorizer.py
in serverless-rest-api/python-rest-sam/src/api
172 13
authorizer.py
in serverless-rest-api/python-http-cdk/src/api
172 13
apigw.yaml
in apigw-private-custom-domain-name/iac
139 -
bookings.js
in serverless-rest-api/javascript-http-sam/src/api
111 -
cognito.yaml
in fargate-rest-api/javascript-rest-nlb-ecs-sam
110 -
bookings.py
in serverless-rest-api/python-rest-sam/src/api
101 2
resources.js
in serverless-rest-api/javascript-http-sam/src/api
99 -
bookings.py
in serverless-rest-api/python-http-sam/src/api
98 2
pipeline_stack.py
in serverless-rest-api/python-http-cdk/lib
98 2
bookings.py
in serverless-rest-api/python-http-cdk/src/api
98 2
locations.js
in serverless-rest-api/javascript-http-sam/src/api
87 -
app.js
in fargate-rest-api/javascript-rest-nlb-ecs-sam/src/api/bookings
86 -
resources.py
in serverless-rest-api/python-rest-sam/src/api
83 1
resources.py
in serverless-rest-api/python-http-sam/src/api
80 1
resources.py
in serverless-rest-api/python-http-cdk/src/api
80 1
app.js
in fargate-rest-api/javascript-rest-nlb-ecs-sam/src/api/locations
76 -
app.js
in fargate-rest-api/javascript-rest-nlb-ecs-sam/src/api/resources
76 -
locations.py
in serverless-rest-api/python-rest-sam/src/api
72 1
alb_multi.yaml
in apigw-private-custom-domain-name/iac
70 -
locations.py
in serverless-rest-api/python-http-sam/src/api
69 1
locations.py
in serverless-rest-api/python-http-cdk/src/api
69 1
nlb_multi.yaml
in apigw-private-custom-domain-name/iac
68 -
handlers.js
in fargate-rest-api/javascript-rest-nlb-ecs-sam/src/api/bookings
63 1
alb.yaml
in apigw-private-custom-domain-name/iac
62 -
nlb.yaml
in apigw-private-custom-domain-name/iac
60 -
cognito_stack.py
in serverless-rest-api/python-http-cdk/lib
55 1
handlers.js
in fargate-rest-api/javascript-rest-nlb-ecs-sam/src/api/resources
53 1
handlers.js
in fargate-rest-api/javascript-rest-nlb-ecs-sam/src/api/locations
52 1
swagger.yaml
in apigw-private-custom-domain-name/iac
43 -
buildspec.yml
in fargate-rest-api/javascript-rest-nlb-ecs-sam/src/api/locations
30 -
buildspec.yml
in fargate-rest-api/javascript-rest-nlb-ecs-sam/src/api/bookings
30 -
buildspec.yml
in fargate-rest-api/javascript-rest-nlb-ecs-sam/src/api/resources
30 -
buildspec.yml
in serverless-rest-api/python-http-sam
29 -
buildspec.yml
in serverless-rest-api/python-rest-sam
29 -
Files With Most Units (Top 20)
File# lines# units
authorizer.js
in serverless-rest-api/javascript-http-sam/src/api
244 14
authorizer.js
in fargate-rest-api/javascript-rest-nlb-ecs-sam/src/api/authorizer
244 14
authorizer.py
in serverless-rest-api/python-http-sam/src/api
172 13
authorizer.py
in serverless-rest-api/python-rest-sam/src/api
172 13
authorizer.py
in serverless-rest-api/python-http-cdk/src/api
172 13
fn.py
in apigw-private-custom-domain-name/src
27 2
bookings.py
in serverless-rest-api/python-http-sam/src/api
98 2
bookings.py
in serverless-rest-api/python-rest-sam/src/api
101 2
pipeline_stack.py
in serverless-rest-api/python-http-cdk/lib
98 2
bookings.py
in serverless-rest-api/python-http-cdk/src/api
98 2
resources.py
in serverless-rest-api/python-http-sam/src/api
80 1
locations.py
in serverless-rest-api/python-http-sam/src/api
69 1
resources.py
in serverless-rest-api/python-rest-sam/src/api
83 1
locations.py
in serverless-rest-api/python-rest-sam/src/api
72 1
cognito_stack.py
in serverless-rest-api/python-http-cdk/lib
55 1
serverless_api_stack.py
in serverless-rest-api/python-http-cdk/lib
656 1
resources.py
in serverless-rest-api/python-http-cdk/src/api
80 1
locations.py
in serverless-rest-api/python-http-cdk/src/api
69 1
application.py
in lambda-ecs-dual-deploy/2-flask-lambda-container/app
9 1
lambda.py
in lambda-ecs-dual-deploy/2-flask-lambda-container/app
8 1
Files With Long Lines (Top 20)

There are 24 files with lines longer than 120 characters. In total, there are 101 long lines.

File# lines# units# long lines
template.yaml
in fargate-rest-api/javascript-rest-nlb-ecs-sam
1259 - 15
swagger.yaml
in serverless-rest-api/python-rest-sam/src/api
265 - 14
serverless_api_stack.py
in serverless-rest-api/python-http-cdk/lib
656 1 13
template.yaml
in serverless-rest-api/python-rest-sam
780 - 9
pipeline.yaml
in fargate-rest-api/javascript-rest-nlb-ecs-sam
741 - 9
template.yaml
in serverless-rest-api/python-http-sam
786 - 8
template.yaml
in serverless-rest-api/javascript-http-sam
779 - 8
cognito_stack.py
in serverless-rest-api/python-http-cdk/lib
55 1 5
pipeline_stack.py
in serverless-rest-api/python-http-cdk/lib
98 2 3
cognito.yaml
in serverless-rest-api/shared
184 - 2
cognito.yaml
in fargate-rest-api/javascript-rest-nlb-ecs-sam
110 - 2
apigw.yaml
in apigw-private-custom-domain-name/iac
139 - 1
pipeline.yaml
in serverless-rest-api/python-http-sam
508 - 1
pipeline.yaml
in serverless-rest-api/python-rest-sam
521 - 1
app.py
in serverless-rest-api/python-http-cdk
16 - 1
buildspec.yml
in serverless-rest-api/javascript-http-sam
20 - 1
authorizer.js
in serverless-rest-api/javascript-http-sam/src/api
244 14 1
pipeline.yaml
in serverless-rest-api/javascript-http-sam
508 - 1
buildspec.yml
in fargate-rest-api/javascript-rest-nlb-ecs-sam
16 - 1
buildspec.yml
in fargate-rest-api/javascript-rest-nlb-ecs-sam/src/api/locations
30 - 1