aws-samples / medical-image-search
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 49 units with 732 lines of code in units (25.5% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (225 lines of code)
    • 12 medium size units (327 lines of code)
    • 5 small units (72 lines of code)
    • 29 very small units (108 lines of code)
0% | 30% | 44% | 9% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 77% | 16% | 5% | 1%
js0% | 0% | 63% | 12% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
MMS0% | 66% | 23% | 8% | 2%
LambdaFunctions0% | 100% | 0% | 0% | 0%
src0% | 0% | 63% | 12% | 23%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in LambdaFunctions/CMprocessLambdaFunction.py
92 17 2
def preprocess()
in MMS/dicom_featurization_service.py
77 12 2
def postprocess()
in MMS/dicom_featurization_service.py
56 6 5
render()
in src/Search.js
36 5 0
function registerValidSW()
in src/serviceWorker.js
33 8 2
label: shortenLabel()
in src/Search.js
32 3 1
30 13 1
function shortenLabel()
in src/Search.js
30 13 1
def handle()
in MMS/dicom_featurization_service.py
25 5 3
function checkValidServiceWorker()
in src/serviceWorker.js
25 4 2
25 2 0
constructor()
in src/Image.js
24 1 1
23 2 0
def __init__()
in MMS/dicom_featurization_service.py
22 5 1
export function register()
in src/serviceWorker.js
22 5 1
def initialize()
in MMS/dicom_featurization_service.py
16 4 2
searchReports()
in src/Search.js
16 1 1
listReports()
in src/Search.js
16 1 2
getReport()
in src/Image.js
13 1 1
export function unregister()
in src/serviceWorker.js
11 2 0