GerritCodeReview / gerrit-monitoring
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 25 units with 329 lines of code in units (13.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 3 simple units (94 lines of code)
    • 22 very simple units (235 lines of code)
0% | 0% | 0% | 28% | 71%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 0% | 0% | 28% | 71%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
subcommands0% | 0% | 0% | 40% | 59%
ROOT0% | 0% | 0% | 0% | 100%
cfgmgr0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def install()
in subcommands/install.py
33 10 4
def _create_dashboard_configmaps()
in subcommands/install.py
35 7 2
def encrypt()
in subcommands/encrypt.py
26 7 2
def _create_promtail_configs()
in subcommands/install.py
26 5 2
def _update_helm_repos()
in subcommands/install.py
11 4 0
def _install_or_update_charts()
in subcommands/install.py
23 4 2
def _get_yn_response()
in subcommands/uninstall.py
8 4 1
def _run_ytt()
in subcommands/install.py
19 3 2
def get_config()
in cfgmgr/abstract.py
10 3 1
def _download_promtail()
in subcommands/install.py
21 2 1
def _deploy_loose_resources()
in subcommands/install.py
9 2 1
def _remove_helm_deployment()
in subcommands/uninstall.py
7 2 2
def _delete_namespace()
in subcommands/uninstall.py
6 2 1
def uninstall()
in subcommands/uninstall.py
5 2 1
def get_config_manager()
in cfgmgr/__init__.py
6 2 1
3 1 1
def _run_encrypt()
in gerrit_monitoring.py
2 1 1
def _run_install()
in gerrit_monitoring.py
7 1 1
def _run_uninstall()
in gerrit_monitoring.py
2 1 1
def main()
in gerrit_monitoring.py
50 1 0