aws-samples / amazon-textract-and-amazon-comprehend-medical-claims-example
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 11 units with 167 lines of code in units (27.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (113 lines of code)
    • 2 small units (25 lines of code)
    • 5 very small units (29 lines of code)
0% | 0% | 67% | 14% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 67% | 14% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 0% | 67% | 14% | 17%
Alternative Visuals
Longest Units
Top 11 longest units
Unit# linesMcCabe index# params
def get_kv_map()
in src/blog-extract.py
34 7 2
def lambda_handler()
in src/blog-parse.py
28 5 2
def lambda_handler()
in src/blog-validate.py
28 8 2
def lambda_handler()
in src/blog-extract.py
23 4 2
def get_text()
in src/blog-extract.py
13 8 2
def validate()
in src/blog-validate.py
12 1 1
def get_kv_relationship()
in src/blog-extract.py
9 2 3
def convert_to_csv()
in src/blog-validate.py
7 1 1
def find_value_block()
in src/blog-extract.py
6 4 2
def search_value()
in src/blog-extract.py
4 3 2
def print_kvs()
in src/blog-extract.py
3 2 1