tensorflow / tfhub.dev
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 97 units with 825 lines of code in units (43.1% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (160 lines of code)
    • 24 small units (340 lines of code)
    • 67 very small units (325 lines of code)
0% | 0% | 19% | 41% | 39%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 19% | 41% | 39%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tools0% | 0% | 19% | 41% | 39%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
34 7 4
def _consume_metadata()
in tools/validator.py
29 11 1
def _check_valid_remote_asset()
in tools/validator.py
26 7 2
def validate_asset_path()
in tools/validator.py
24 7 5
def validate()
in tools/validator.py
24 5 3
def __init__()
in tools/tags_validator.py
23 4 5
def assert_correct_content()
in tools/validator.py
18 6 3
def main()
in tools/tags_validator_main.py
18 5 1
def _is_asset_path_modified()
in tools/validator.py
17 6 1
def __init__()
in tools/validator.py
16 1 9
def __init__()
in tools/validator.py
16 1 6
def create_tag_parser()
in tools/tags_validator.py
16 2 2
def _assert_valid_url()
in tools/tags_validator.py
16 7 2
15 3 1
def from_tag_name()
in tools/yaml_parser.py
15 2 3
def _consume_description()
in tools/validator.py
14 6 1
14 2 3
def _validate_yaml_config()
in tools/tags_validator.py
14 4 3
def from_yaml()
in tools/yaml_parser.py
14 4 3
def __init__()
in tools/validator.py
13 1 9