aws-samples / amazon-lex-migration-utility
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 29 units with 310 lines of code in units (40.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 7 medium size units (174 lines of code)
    • 0 small units (0 lines of code)
    • 22 very small units (136 lines of code)
0% | 0% | 56% | 0% | 43%
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% | 82% | 0% | 17%
js0% | 0% | 41% | 0% | 58%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lex_exporter0% | 0% | 82% | 0% | 17%
custom-resources/lex-intent0% | 0% | 41% | 0% | 58%
custom-resources/lex-bot0% | 0% | 42% | 0% | 58%
custom-resources/lex-slot0% | 0% | 42% | 0% | 58%
custom-resources/lex-alias0% | 0% | 42% | 0% | 58%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def create_resource()
in lex_exporter/create_lex_template.py
38 4 7
def create_lex_bot_aliases()
in lex_exporter/create_lex_template.py
28 3 5
def create_lex_bot_permissions()
in lex_exporter/create_lex_template.py
24 3 3
function getBotAttrs()
in custom-resources/lex-bot/index.js
21 2 2
function getIntentAttrs()
in custom-resources/lex-intent/index.js
21 2 2
function getSlotAttrs()
in custom-resources/lex-slot/index.js
21 2 2
function getBotAttrs()
in custom-resources/lex-alias/index.js
21 2 2
def show_help()
in lex_exporter/create_lex_template.py
10 2 1
def get_latest_intent()
in lex_exporter/create_lex_template.py
9 5 1
const Update = function()
in custom-resources/lex-intent/index.js
9 3 4
const Update = function()
in custom-resources/lex-bot/index.js
8 3 4
getBotAttrs()
in custom-resources/lex-bot/index.js
8 2 3
getIntentAttrs()
in custom-resources/lex-intent/index.js
8 2 3
const Update = function()
in custom-resources/lex-slot/index.js
8 3 4
getSlotAttrs()
in custom-resources/lex-slot/index.js
8 2 3
const Update = function()
in custom-resources/lex-alias/index.js
8 3 4
getBotAttrs()
in custom-resources/lex-alias/index.js
8 2 3
getBotAttrs()
in custom-resources/lex-bot/index.js
7 2 3
getIntentAttrs()
in custom-resources/lex-intent/index.js
7 2 3
getSlotAttrs()
in custom-resources/lex-slot/index.js
7 2 3