awslabs / critter
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 374 lines of code in units (81.0% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (194 lines of code)
    • 5 medium size units (149 lines of code)
    • 2 small units (27 lines of code)
    • 1 very small units (4 lines of code)
0% | 51% | 39% | 7% | 1%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 51% | 39% | 7% | 1%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
critter0% | 51% | 39% | 7% | 1%
Alternative Visuals
Longest Units
Top 11 longest units
Unit# linesMcCabe index# params
def parse_args()
in critter/stack.py
77 7 2
66 25 1
def process_outputs()
in critter/stack.py
51 16 1
def test()
in critter/stack.py
39 7 1
def update()
in critter/stack.py
31 5 1
29 10 1
def deploy()
in critter/stack.py
26 4 1
24 8 1
16 4 1
def delete()
in critter/stack.py
11 1 1
4 1 1