aws-quickstart / quickstart-sap-hana
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 54 units with 1,077 lines of code in units (87.2% of code).
    • 1 very long units (168 lines of code)
    • 3 long units (192 lines of code)
    • 8 medium size units (273 lines of code)
    • 19 small units (287 lines of code)
    • 23 very small units (157 lines of code)
15% | 17% | 25% | 26% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py18% | 6% | 30% | 30% | 14%
js0% | 77% | 0% | 7% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
scripts21% | 6% | 25% | 32% | 14%
scripts/suse-rhel-sap-ami0% | 48% | 26% | 10% | 14%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in scripts/build_storage.py
168 37 0
function instance2AMIRegEx()
in scripts/suse-rhel-sap-ami/list.js
73 3 0
function getAMImatrix()
in scripts/suse-rhel-sap-ami/list.js
65 1 0
def main()
in scripts/reconcile-ips.py
54 11 0
def get_latest_ami()
in scripts/suse-rhel-sap-ami/latest.py
50 1 0
def get_hana_data_log_config()
in scripts/get_vol_template.py
46 7 0
def set_advancedconfig()
in scripts/get_advancedoptions.py
39 8 2
def main()
in scripts/postprocess.py
35 5 0
def get_backup()
in scripts/get_vol_template.py
31 6 0
def main()
in scripts/suse-rhel-sap-ami/latest.py
25 1 0
def download_s3()
in scripts/download_media.py
25 6 2
def get_mystack_params()
in scripts/download_media.py
22 3 0
def get_usrsap()
in scripts/get_vol_template.py
18 4 0
def get_shared()
in scripts/get_vol_template.py
18 4 0
def get_mystack_params()
in scripts/get_advancedoptions.py
18 2 0
def exe_cmd()
in scripts/suse-rhel-sap-ami/latest.py
17 2 2
def exe_cmd()
in scripts/postprocess.py
17 2 2
def get_mystack_params()
in scripts/postprocess.py
17 2 0
def exe_cmd()
in scripts/get_advancedoptions.py
17 2 2
def main()
in scripts/get_advancedoptions.py
17 3 0