awslabs / aws-build-accumulator
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 150 units with 1,448 lines of code in units (39.9% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (129 lines of code)
    • 15 medium size units (419 lines of code)
    • 33 small units (477 lines of code)
    • 100 very small units (423 lines of code)
0% | 8% | 28% | 32% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 8% | 28% | 32% | 29%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib0% | 8% | 28% | 32% | 29%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _run_schema()
in lib/validation.py
77 7 0
def render()
in lib/litani_report.py
52 7 3
def get_run()
in lib/litani_report.py
45 7 1
def _get_default_outcome_dict()
in lib/job_outcome.py
35 7 1
def run_consistent_to_job()
in lib/run_printer.py
35 13 2
def _get_cache_dir()
in lib/litani.py
31 6 1
def _single_job_schema()
in lib/validation.py
30 9 0
def build()
in lib/ninja_syntax.py
30 13 9
def __call__()
in lib/transform_jobs.py
29 11 2
def get_stats_groups()
in lib/litani_report.py
26 11 2
def add_stage_stats()
in lib/litani_report.py
25 10 3
def _line()
in lib/ninja_syntax.py
23 4 3
def __str__()
in lib/graph.py
23 8 1
def process_output()
in lib/ninja.py
22 6 1
def render()
in lib/litani_report.py
22 6 3
def sort_run()
in lib/litani_report.py
22 4 1
def rule()
in lib/ninja_syntax.py
21 9 11
def _outcome_table_schema()
in lib/validation.py
20 4 0
20 4 3
def __str__()
in lib/graph.py
20 3 1