aws-samples / dicom-metadata-extractor-serverless-datalake
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 39 units with 541 lines of code in units (42.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (88 lines of code)
    • 8 medium size units (237 lines of code)
    • 7 small units (101 lines of code)
    • 23 very small units (115 lines of code)
0% | 16% | 43% | 18% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 16% | 43% | 18% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 28% | 46% | 4% | 20%
src/utils0% | 0% | 40% | 37% | 22%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
88 8 2
def vr_select()
in src/utils/tags.py
46 3 1
def get()
in src/s3wrapper.py
37 8 1
def download_file()
in src/s3wrapper.py
27 4 1
def output()
in src/app.py
27 3 1
def validate_vm()
in src/utils/tags.py
27 7 1
def transform()
in src/dicomwrapper.py
25 6 3
def inspect()
in src/app.py
25 6 2
def convert_PN()
in src/utils/tags.py
23 6 1
def tar()
in src/utils/utils.py
18 5 1
def unzip()
in src/utils/utils.py
16 8 1
def convert_DA()
in src/utils/tags.py
15 6 1
def convert_SQ()
in src/utils/tags.py
14 7 1
def convert_DT()
in src/utils/tags.py
14 5 1
def get_logger()
in src/logger.py
13 3 1
def convert_OB()
in src/utils/tags.py
11 4 1
def __init__()
in src/s3wrapper.py
10 1 5
def generate_PN()
in src/utils/tags.py
10 1 1
def set_file_ext()
in src/s3wrapper.py
9 3 2
def return_integer()
in src/utils/tags.py
8 3 1