GerritCodeReview / homepage
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 394 lines of code in units (4.4% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (64 lines of code)
    • 4 medium size units (120 lines of code)
    • 6 small units (77 lines of code)
    • 23 very small units (133 lines of code)
0% | 16% | 30% | 19% | 33%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 64% | 0% | 0% | 36%
py0% | 0% | 40% | 26% | 32%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
js0% | 64% | 0% | 0% | 36%
tools0% | 0% | 40% | 26% | 32%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
64 16 1
def _get_owner_names()
in tools/plugins.py
34 11 4
def _create_plugin()
in tools/plugins.py
33 4 4
def _parse_options()
in tools/plugins.py
28 1 0
def render_page()
in tools/plugins.py
25 4 2
def _get_branch_results()
in tools/plugins.py
19 7 4
def _create_plugins()
in tools/plugins.py
14 3 1
def _render_header()
in tools/plugins.py
11 2 0
def _get_matrix_header()
in tools/plugins.py
11 4 2
def _get_meta_data()
in tools/plugins.py
11 2 2
11 5 2
def _render_template()
in tools/plugins.py
10 1 0
def _is_project_empty()
in tools/plugins.py
10 4 2
def _render_maintainers()
in tools/plugins.py
10 3 2
9 3 1
$()
in js/customscripts.js
9 2 1
def __init__()
in tools/plugins.py
8 1 1
def _get_branches()
in tools/plugins.py
8 3 2
$()
in js/customscripts.js
8 2 1
def render()
in tools/plugins.py
7 3 1