aws-samples / aws-emr-apache-ranger
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 24 units with 1,197 lines of code in units (94.8% of code).
    • 2 very long units (781 lines of code)
    • 0 long units (0 lines of code)
    • 8 medium size units (302 lines of code)
    • 4 small units (68 lines of code)
    • 10 very small units (46 lines of code)
65% | 0% | 25% | 5% | 3%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py74% | 0% | 14% | 6% | 4%
js0% | 0% | 100% | 0% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
aws_emr_blog_v2/code/launch-cluster78% | 0% | 12% | 5% | 3%
aws_emr_blog_v3/code/launch-cluster68% | 0% | 17% | 8% | 5%
aws_emr_blog_v2/code/amilookup-win0% | 0% | 100% | 0% | 0%
aws_emr_blog_v3/code/amilookup-win0% | 0% | 100% | 0% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def create()
in aws_emr_blog_v2/code/launch-cluster/cremr.py
488 22 2
def create()
in aws_emr_blog_v3/code/launch-cluster/cremr.py
293 17 2
def cfn_handler()
in aws_emr_blog_v2/code/launch-cluster/crhelper.py
44 14 7
def cfn_handler()
in aws_emr_blog_v3/code/launch-cluster/crhelper.py
44 14 7
exports.handler = function()
in aws_emr_blog_v2/code/amilookup-win/amilookup-win.js
39 4 2
exports.handler = function()
in aws_emr_blog_v3/code/amilookup-win/amilookup-win.js
39 4 2
function sendResponse()
in aws_emr_blog_v2/code/amilookup-win/amilookup-win.js
37 1 4
function sendResponse()
in aws_emr_blog_v3/code/amilookup-win/amilookup-win.js
37 1 4
def send()
in aws_emr_blog_v2/code/launch-cluster/crhelper.py
31 8 7
def send()
in aws_emr_blog_v3/code/launch-cluster/crhelper.py
31 8 7
def log_config()
in aws_emr_blog_v2/code/launch-cluster/crhelper.py
19 8 3
def log_config()
in aws_emr_blog_v3/code/launch-cluster/crhelper.py
19 8 3
def delete()
in aws_emr_blog_v2/code/launch-cluster/cremr.py
15 1 2
def delete()
in aws_emr_blog_v3/code/launch-cluster/cremr.py
15 1 2
def update_num_retries()
in aws_emr_blog_v2/code/launch-cluster/crhelper.py
7 3 2
def update_num_retries()
in aws_emr_blog_v3/code/launch-cluster/crhelper.py
7 3 2
def handler()
in aws_emr_blog_v2/code/launch-cluster/cremr.py
5 1 2
def handler()
in aws_emr_blog_v3/code/launch-cluster/cremr.py
5 1 2
def timeout()
in aws_emr_blog_v2/code/launch-cluster/crhelper.py
4 1 3
def update()
in aws_emr_blog_v2/code/launch-cluster/cremr.py
4 1 2