aws-samples / amazon-rekognition-custom-labels-mitotic-figures
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 13 units with 314 lines of code in units (76.2% of code).
    • 1 very long units (146 lines of code)
    • 1 long units (69 lines of code)
    • 1 medium size units (48 lines of code)
    • 1 small units (18 lines of code)
    • 9 very small units (33 lines of code)
46% | 21% | 15% | 5% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py46% | 21% | 15% | 5% | 10%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
fargate_app/rek_wsi100% | 0% | 0% | 0% | 0%
ROOT0% | 41% | 28% | 10% | 19%
Alternative Visuals
Longest Units
Top 13 longest units
Unit# linesMcCabe index# params
def __init__()
in fargate_app/rek_wsi/rek_wsi_stack.py
146 6 4
def get_slides()
in sampling.py
69 14 6
48 2 0
def __init__()
in sampling.py
18 2 9
def sampling_func()
in sampling.py
10 1 2
def __init__()
in sampling.py
5 1 5
def check_bbox()
in sampling.py
5 4 4
def get_patch()
in sampling.py
3 1 3
def left()
in sampling.py
2 1 1
def top()
in sampling.py
2 1 1
def right()
in sampling.py
2 1 1
def bottom()
in sampling.py
2 1 1
def shape()
in sampling.py
2 1 1