aws-samples / aws-batch-comp-infrastructure-sample
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 14 units with 106 lines of code in units (13.4% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (27 lines of code)
    • 2 small units (40 lines of code)
    • 11 very small units (39 lines of code)
0% | 0% | 25% | 37% | 36%
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% | 25% | 37% | 36%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 0% | 25% | 37% | 36%
Alternative Visuals
Longest Units
Top 14 longest units
Unit# linesMcCabe index# params
def main()
in run_example.py
27 6 1
def fetch_logs()
in run_example.py
20 4 3
def get_ip_address()
in run_example.py
20 5 3
def fetch_ip()
in run_example.py
6 3 3
def get_outputs()
in run_example.py
6 2 2
def kill()
in run_example.py
5 1 1
5 3 1
def __init__()
in run_example.py
4 1 4
def task_completed()
in run_example.py
3 1 1
def __init__()
in run_example.py
2 1 2
def get_log_group()
in run_example.py
2 1 2
def get_log_stream()
in run_example.py
2 1 3
def __init__()
in run_example.py
2 1 2
def __init__()
in run_example.py
2 1 2