aws-samples / smallmatter-package
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 173 units with 1,970 lines of code in units (73.9% of code).
    • 1 very long units (110 lines of code)
    • 2 long units (121 lines of code)
    • 20 medium size units (653 lines of code)
    • 34 small units (518 lines of code)
    • 116 very small units (568 lines of code)
5% | 6% | 33% | 26% | 28%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py5% | 6% | 33% | 26% | 28%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT13% | 14% | 45% | 19% | 7%
src/smallmatter0% | 0% | 26% | 32% | 41%
src/smallmatter/typecheck0% | 0% | 18% | 42% | 38%
notebooks/smproc-stopgap0% | 0% | 0% | 0% | 100%
src/smallmatter/aws_lambda0% | 0% | 0% | 0% | 100%
notebooks/smproc-stopgap/sourcedir0% | 0% | 0% | 0% | 100%
notebooks0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def get_cmdclass()
in versioneer.py
110 14 0
def do_setup()
in versioneer.py
64 14 0
def get_versions()
in versioneer.py
57 22 1
def git_pieces_from_vcs()
in src/smallmatter/_version.py
50 16 4
50 16 4
def git_versions_from_keywords()
in src/smallmatter/_version.py
41 17 3
41 17 3
def get_versions()
in src/smallmatter/_version.py
36 7 0
def run_command()
in versioneer.py
35 10 6
def get_versions()
in versioneer.py
34 5 0
def scan_setup_py()
in versioneer.py
34 9 0
def render()
in src/smallmatter/_version.py
32 10 2
def render()
in versioneer.py
32 10 2
def run_command()
in src/smallmatter/_version.py
31 10 6
def run_command()
in versioneer.py
31 10 6
def do_vcs_install()
in versioneer.py
31 11 3
def save_reports()
in src/smallmatter/ds.py
30 3 2
def render()
in versioneer.py
27 10 2
def check_columns()
in src/smallmatter/typecheck/_pdcheck.py
26 2 2
def get_root()
in versioneer.py
26 8 0