aws-samples / aws-sagemaker-using-sap-data-blog
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 10 units with 159 lines of code in units (29.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (108 lines of code)
    • 1 small units (20 lines of code)
    • 5 very small units (31 lines of code)
0% | 0% | 67% | 12% | 19%
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% | 67% | 12% | 19%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
scripts0% | 0% | 67% | 12% | 19%
Alternative Visuals
Longest Units
Top 10 longest units
Unit# linesMcCabe index# params
def _get_secret()
in scripts/sap-data-extraction.py
29 6 0
def _get_secret()
in scripts/sap-data-import.py
29 6 0
def _extract()
in scripts/sap-data-extraction.py
28 5 1
def _import_json()
in scripts/sap-data-import.py
22 4 0
def _make_http_call_to_sap()
in scripts/sap-data-extraction.py
20 4 2
def _get_data()
in scripts/sap-data-import.py
10 1 0
def _setResponse()
in scripts/sap-data-extraction.py
9 1 4
def _get_base_url()
in scripts/sap-data-extraction.py
5 2 0
def _get_base_url()
in scripts/sap-data-import.py
5 2 0
def _athenaJson()
in scripts/sap-data-extraction.py
2 2 1