GerritCodeReview / git-repo
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 667 units with 9,617 lines of code in units (89.3% of code).
    • 10 very long units (1,426 lines of code)
    • 20 long units (1,383 lines of code)
    • 96 medium size units (3,031 lines of code)
    • 137 small units (1,973 lines of code)
    • 404 very small units (1,804 lines of code)
14% | 14% | 31% | 20% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py14% | 14% | 31% | 20% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT16% | 8% | 27% | 25% | 22%
subcmds12% | 25% | 39% | 10% | 11%
release0% | 0% | 14% | 52% | 32%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _RemoteFetch()
in project.py
189 49 18
def _SyncManifest()
in subcmds/init.py
177 36 2
def ToXml()
in manifest_xml.py
165 39 5
def Execute()
in subcmds/sync.py
150 32 3
def _ParseManifest()
in manifest_xml.py
147 58 2
146 20 4
def _Run()
in main.py
121 33 4
def __init__()
in git_command.py
112 19 13
def _UploadAndReport()
in subcmds/upload.py
110 8 4
109 7 17
def _Options()
in subcmds/sync.py
90 2 3
def _ParseProject()
in manifest_xml.py
84 24 4
81 22 1
def _SmartSyncSetup()
in subcmds/sync.py
80 22 3
80 16 3
def Execute()
in subcmds/branches.py
77 25 3
def Execute()
in subcmds/rebase.py
74 26 3
def _GCProjects()
in subcmds/sync.py
70 20 4
70 27 3
def _InitGitDir()
in project.py
70 34 4