GerritCodeReview / gerrit-monitoring
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 25 units with 329 lines of code in units (13.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 7 medium size units (214 lines of code)
    • 2 small units (30 lines of code)
    • 16 very small units (85 lines of code)
0% | 0% | 65% | 9% | 25%
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% | 65% | 9% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
subcommands0% | 0% | 70% | 12% | 16%
ROOT0% | 0% | 81% | 0% | 18%
cfgmgr0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in gerrit_monitoring.py
50 1 0
def _create_dashboard_configmaps()
in subcommands/install.py
35 7 2
def install()
in subcommands/install.py
33 10 4
def _create_promtail_configs()
in subcommands/install.py
26 5 2
def encrypt()
in subcommands/encrypt.py
26 7 2
def _install_or_update_charts()
in subcommands/install.py
23 4 2
def _download_promtail()
in subcommands/install.py
21 2 1
def _run_ytt()
in subcommands/install.py
19 3 2
def _update_helm_repos()
in subcommands/install.py
11 4 0
def get_config()
in cfgmgr/abstract.py
10 3 1
def _deploy_loose_resources()
in subcommands/install.py
9 2 1
def _get_yn_response()
in subcommands/uninstall.py
8 4 1
def _remove_helm_deployment()
in subcommands/uninstall.py
7 2 2
def _run_install()
in gerrit_monitoring.py
7 1 1
def _delete_namespace()
in subcommands/uninstall.py
6 2 1
def get_config_manager()
in cfgmgr/__init__.py
6 2 1
def __init__()
in cfgmgr/abstract.py
6 1 2
def uninstall()
in subcommands/uninstall.py
5 2 1
def _parse()
in cfgmgr/sops.py
4 1 1
def _parse()
in cfgmgr/default.py
4 1 1