aws-samples / aws-media-asset-preparation-system
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 1,447 units with 21,906 lines of code in units (64.6% of code).
    • 88 very long units (9,576 lines of code)
    • 19 long units (1,278 lines of code)
    • 110 medium size units (3,314 lines of code)
    • 218 small units (3,189 lines of code)
    • 1,012 very small units (4,549 lines of code)
43% | 5% | 15% | 14% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py43% | 4% | 14% | 14% | 22%
js45% | 16% | 16% | 11% | 9%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
amplify/backend/function43% | 4% | 14% | 14% | 22%
public61% | 18% | 8% | 3% | 7%
src/components/Utilities27% | 27% | 20% | 13% | 11%
src/components/View36% | 0% | 29% | 29% | 4%
src/components/Cards78% | 0% | 21% | 0% | 0%
src/components/Table53% | 0% | 37% | 8% | 0%
src/components/UtilityPages0% | 100% | 0% | 0% | 0%
src/graphql0% | 0% | 18% | 63% | 18%
src/store/user0% | 0% | 0% | 40% | 60%
src/store/mapsconfig0% | 0% | 0% | 0% | 100%
src0% | 0% | 0% | 0% | 100%
src/components/Main0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function ViewController()
in public/explorer.js
336 53 2
def lambda_handler()
in amplify/backend/function/mapsmediaconvertstartjob/src/lambda_function.py
214 12 2
function UploadController()
in public/explorer.js
162 21 2
function TrashController()
in public/explorer.js
137 23 2
function FilePicker()
in src/components/Utilities/FilePicker.js
135 4 1
function ControlsToolbar()
in src/components/View/ControlsToolbar.js
124 8 1
function CardAsset()
in src/components/Cards/CardAsset.js
117 14 1
function TableAssetView()
in src/components/Table/TableAssetView.js
113 7 1
def _seg_0()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/idna/uts46data.py
103 1 0
def _seg_1()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/idna/uts46data.py
103 1 0
def _seg_2()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/idna/uts46data.py
103 1 0
def _seg_3()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/idna/uts46data.py
103 1 0
def _seg_4()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/idna/uts46data.py
103 1 0
def _seg_5()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/idna/uts46data.py
103 1 0
def _seg_6()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/idna/uts46data.py
103 1 0
def _seg_7()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/idna/uts46data.py
103 1 0
def _seg_8()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/idna/uts46data.py
103 1 0
def _seg_9()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/idna/uts46data.py
103 1 0
def _seg_10()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/idna/uts46data.py
103 1 0
def _seg_11()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/idna/uts46data.py
103 1 0