aws-samples / amazon-sagemaker-entrypoint-utilities
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 82 units with 1,383 lines of code in units (84.2% of code).
    • 1 very long units (110 lines of code)
    • 2 long units (121 lines of code)
    • 20 medium size units (642 lines of code)
    • 20 small units (305 lines of code)
    • 39 very small units (205 lines of code)
7% | 8% | 46% | 22% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py7% | 8% | 46% | 22% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT12% | 14% | 45% | 19% | 8%
src/smepu0% | 0% | 47% | 26% | 25%
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/smepu/_version.py
50 16 4
50 16 4
def git_versions_from_keywords()
in src/smepu/_version.py
41 17 3
41 17 3
def get_versions()
in src/smepu/_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/smepu/_version.py
32 10 2
def render()
in versioneer.py
32 10 2
def run_command()
in src/smepu/_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 render()
in versioneer.py
27 10 2
def get_root()
in versioneer.py
26 8 0
def git_get_keywords()
in versioneer.py
24 3 1
def setup_opinionated_logger()
in src/smepu/core.py
23 5 2