awslabs / aws-crt-builder
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 255 units with 2,666 lines of code in units (73.2% of code).
    • 1 very long units (106 lines of code)
    • 7 long units (463 lines of code)
    • 22 medium size units (642 lines of code)
    • 43 small units (612 lines of code)
    • 182 very small units (843 lines of code)
3% | 17% | 24% | 22% | 31%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py3% | 17% | 24% | 22% | 31%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
builder/actions23% | 23% | 18% | 16% | 18%
builder/core0% | 13% | 22% | 24% | 39%
builder0% | 39% | 47% | 7% | 5%
builder/imports0% | 14% | 27% | 29% | 27%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def print_release_notes()
in builder/actions/release.py
106 19 1
def produce_config()
in builder/core/project.py
100 35 5
def parse_args()
in builder/main.py
76 29 0
def __init__()
in builder/core/env.py
67 21 2
def install()
in builder/imports/jdk.py
60 19 2
def _build_project()
in builder/actions/cmake.py
55 12 5
def run_command()
in builder/core/util.py
54 9 2
def run()
in builder/actions/install.py
51 18 2
def _get_git_branch()
in builder/core/env.py
42 16 0
def main()
in builder/main.py
41 12 0
def __init__()
in builder/core/toolchain.py
38 16 2
def __init__()
in builder/core/spec.py
36 16 2
def default_compiler()
in builder/core/toolchain.py
36 17 2
def run()
in builder/actions/script.py
36 15 2
def install()
in builder/imports/libcrypto.py
35 7 2
def current_host()
in builder/core/host.py
34 16 0
def install()
in builder/imports/dockcross.py
30 3 2
def pre_build()
in builder/core/project.py
28 8 2
def find_project()
in builder/core/project.py
27 14 2
def load()
in builder/core/scripts.py
26 8 1