awslabs / aws-config-rdk
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 264 units with 4,329 lines of code in units (74.8% of code).
    • 5 very long units (1,177 lines of code)
    • 9 long units (653 lines of code)
    • 31 medium size units (1,031 lines of code)
    • 41 small units (567 lines of code)
    • 178 very small units (901 lines of code)
27% | 15% | 23% | 13% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py30% | 15% | 24% | 12% | 17%
js0% | 47% | 0% | 22% | 29%
cs0% | 0% | 27% | 13% | 59%
java0% | 0% | 0% | 23% | 76%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
rdk42% | 11% | 28% | 9% | 8%
rdk/template/runtime/python3.70% | 30% | 12% | 22% | 35%
rdk/template/runtime/python3.80% | 30% | 12% | 22% | 35%
rdk/template/runtime/python3.60% | 30% | 12% | 22% | 35%
rdk/template/runtime/python3.90% | 30% | 12% | 22% | 35%
rdk/template/runtime/nodejs4.30% | 47% | 0% | 22% | 29%
rdk/template/runtime/python3.6-managed0% | 0% | 43% | 13% | 42%
rdk/template/runtime/dotnetcore2.00% | 0% | 27% | 13% | 59%
rdk/template/runtime/dotnetcore1.00% | 0% | 27% | 13% | 59%
rdk/template/runtime/java80% | 0% | 0% | 23% | 76%
rdk/template/runtime/python3.7-lib0% | 0% | 0% | 0% | 100%
rdk/template/runtime/python3.9-lib0% | 0% | 0% | 0% | 100%
rdk/template/runtime/python3.6-lib0% | 0% | 0% | 0% | 100%
rdk/template/runtime/python3.8-lib0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def deploy()
in rdk/rdk.py
407 33 1
252 31 1
231 20 1
157 16 1
def init()
in rdk/rdk.py
130 34 1
def clean()
in rdk/rdk.py
99 9 1
def export()
in rdk/rdk.py
76 14 1
def create()
in rdk/rdk.py
72 17 1
def lambda_handler()
in rdk/template/runtime/python3.7/rule_code.py
69 25 2
def lambda_handler()
in rdk/template/runtime/python3.8/rule_code.py
69 25 2
def lambda_handler()
in rdk/template/runtime/python3.6/rule_code.py
69 25 2
def lambda_handler()
in rdk/template/runtime/python3.9/rule_code.py
69 25 2
66 2 1
exports.lambda_handler = function()
in rdk/template/runtime/nodejs4.3/rule_code.js
64 13 3
49 11 6
46 22 2
46 5 3
43 1 3
def rule_handler()
in rdk/template/runtime/python3.6-managed/managed-rule-code/rule_code.py
42 12 1
def rule_handler()
in rdk/template/runtime/python3.6-managed/managed-rule-code/rule_util.py
42 12 1