microsoft / vcpkg
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 34 units with 449 lines of code in units (0.5% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (58 lines of code)
    • 5 medium size units (142 lines of code)
    • 10 small units (145 lines of code)
    • 18 very small units (104 lines of code)
0% | 12% | 31% | 32% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 17% | 34% | 29% | 19%
pl0% | 0% | 26% | 45% | 27%
c0% | 0% | 0% | 0% | 100%
cc0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
scripts/buildsystems0% | 28% | 39% | 20% | 12%
scripts0% | 0% | 26% | 43% | 29%
ports/qca0% | 0% | 26% | 45% | 27%
ports/alac-decoder0% | 0% | 0% | 0% | 100%
ports/breakpad0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def fix_dependency()
in scripts/buildsystems/osx/applocal.py
58 17 2
def main()
in scripts/buildsystems/osx/applocal.py
38 7 0
def generate_baseline()
in scripts/generateBaseline.py
35 7 0
sub HELP_MESSAGE()
in ports/qca/mk-ca-bundle.pl
27 2 0
def normalize_qtplugin_name()
in scripts/buildsystems/osx/applocal.py
21 2 1
def normalize_qtlib_name()
in scripts/buildsystems/osx/applocal.py
21 2 1
def normalize_loaderpath_name()
in scripts/buildsystems/osx/applocal.py
18 2 1
def generate_versions_db()
in scripts/generatePortVersionsDb.py
18 4 1
sub parse_csv_param()
in ports/qca/mk-ca-bundle.pl
17 4 0
sub warning_message()
in ports/qca/mk-ca-bundle.pl
16 2 0
def generate_versions_file()
in scripts/generatePortVersionsDb.py
14 3 1
sub sha256()
in ports/qca/mk-ca-bundle.pl
13 3 0
def gen_all_file_strings()
in scripts/file_script.py
13 5 4
def main()
in scripts/file_script.py
13 3 1
def run_and_get_output()
in scripts/buildsystems/osx/applocal.py
12 2 1
def fix_main_binaries()
in scripts/buildsystems/osx/applocal.py
11 7 0
sub oldhash()
in ports/qca/mk-ca-bundle.pl
10 4 0
def get_version_tag()
in scripts/generateBaseline.py
10 5 1
def main()
in scripts/generatePortVersionsDb.py
10 3 0
def get_dependencies()
in scripts/buildsystems/osx/applocal.py
9 6 1