microsoft / MCW-SAP-HANA-on-Azure
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 660 lines of code in units (15.6% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (171 lines of code)
    • 9 medium size units (289 lines of code)
    • 5 small units (76 lines of code)
    • 18 very small units (124 lines of code)
0% | 25% | 43% | 11% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 25% | 43% | 11% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ansible0% | 28% | 37% | 12% | 20%
python-scripts0% | 0% | 100% | 0% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _load_machines()
in Hands-on lab/labfiles/sap-hana/deploy/vm/ansible/azure_rm.py
93 21 2
def __init__()
in Hands-on lab/labfiles/sap-hana/deploy/vm/ansible/azure_rm.py
78 30 2
def _get_credentials()
in Hands-on lab/labfiles/sap-hana/deploy/vm/ansible/azure_rm.py
40 10 2
def __init__()
in Hands-on lab/labfiles/sap-hana/deploy/vm/ansible/azure_rm.py
39 6 1
def _parse_cli_args()
in Hands-on lab/labfiles/sap-hana/deploy/vm/ansible/azure_rm.py
39 1 1
def main()
in Hands-on lab/labfiles/sap-hana/deploy/vm/python-scripts/migrate-disk.py
38 2 0
def _add_host()
in Hands-on lab/labfiles/sap-hana/deploy/vm/ansible/azure_rm.py
35 16 2
def main()
in Hands-on lab/labfiles/sap-hana/deploy/vm/python-scripts/redeploy-vm.py
29 1 0
def get_inventory()
in Hands-on lab/labfiles/sap-hana/deploy/vm/ansible/azure_rm.py
24 11 1
def _get_settings()
in Hands-on lab/labfiles/sap-hana/deploy/vm/ansible/azure_rm.py
23 14 1
def _tags_match()
in Hands-on lab/labfiles/sap-hana/deploy/vm/ansible/azure_rm.py
22 9 3
def _load_settings()
in Hands-on lab/labfiles/sap-hana/deploy/vm/ansible/azure_rm.py
19 3 1
def _get_profile()
in Hands-on lab/labfiles/sap-hana/deploy/vm/ansible/azure_rm.py
18 5 2
def _get_msi_credentials()
in Hands-on lab/labfiles/sap-hana/deploy/vm/ansible/azure_rm.py
14 4 2
def _get_security_groups()
in Hands-on lab/labfiles/sap-hana/deploy/vm/ansible/azure_rm.py
13 6 2
def _register()
in Hands-on lab/labfiles/sap-hana/deploy/vm/ansible/azure_rm.py
12 2 2
def _get_env_credentials()
in Hands-on lab/labfiles/sap-hana/deploy/vm/ansible/azure_rm.py
10 5 1
def _selected_machines()
in Hands-on lab/labfiles/sap-hana/deploy/vm/ansible/azure_rm.py
10 8 2
def _get_azure_cli_credentials()
in Hands-on lab/labfiles/sap-hana/deploy/vm/ansible/azure_rm.py
9 1 1
def _get_powerstate()
in Hands-on lab/labfiles/sap-hana/deploy/vm/ansible/azure_rm.py
9 4 3