awslabs / damo
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 125 units with 1,876 lines of code in units (89.0% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (239 lines of code)
    • 23 medium size units (782 lines of code)
    • 38 small units (571 lines of code)
    • 60 very small units (284 lines of code)
0% | 12% | 41% | 30% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 12% | 41% | 30% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 12% | 41% | 30% | 15%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def debugfs_scheme()
in _convert_damos.py
78 13 4
def main()
in monitor.py
56 14 1
def record_to_damon_result()
in _damon_result.py
53 15 4
52 15 3
def main()
in bin2txt.py
50 10 1
48 9 1
47 12 5
def main()
in record.py
47 11 1
def main()
in schemes.py
46 10 1
def main()
in nr_regions.py
46 13 1
def do_record()
in record.py
37 11 6
def main()
in wss.py
34 7 1
34 12 0
32 10 4
32 12 1
31 7 0
def cleanup_exit()
in record.py
30 10 2
29 6 1
def parse_damon_result_for()
in _damon_result.py
29 8 5
def pr_heats()
in heats.py
28 6 2