aws-samples / aws-elasticache-retail-dashboard
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 19 units with 154 lines of code in units (7.4% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (23 lines of code)
    • 3 small units (45 lines of code)
    • 15 very small units (86 lines of code)
0% | 0% | 14% | 29% | 55%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 0% | 14% | 29% | 55%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
app/build0% | 0% | 19% | 38% | 42%
backend0% | 0% | 0% | 0% | 100%
producer0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 19 longest units
Unit# linesMcCabe index# params
module.exports = function()
in app/build/check-versions.js
23 5 0
function generateLoaders()
in app/build/utils.js
19 4 2
exports.cssLoaders = function()
in app/build/utils.js
14 2 1
12 2 1
orderCount: Number()
in backend/server.js
10 2 1
scss: generateLoaders()
in app/build/utils.js
9 2 1
stylus: generateLoaders()
in app/build/utils.js
8 2 1
uniqueItemCount: Number()
in backend/server.js
8 2 1
currentVersion: exec()
in app/build/check-versions.js
7 2 1
styl: generateLoaders()
in app/build/utils.js
7 2 1
quantity: getRandomInt()
in producer/producer.js
7 1 1
exports.assetsPath = function()
in app/build/utils.js
6 2 1
items: Array()
in producer/producer.js
6 1 1
count: Number()
in backend/server.js
5 1 1
css: generateLoaders()
in app/build/utils.js
4 1 0
function exec()
in app/build/check-versions.js
3 1 1
postcss: generateLoaders()
in app/build/utils.js
3 1 0
less: generateLoaders()
in app/build/utils.js
2 1 1
sass: generateLoaders()
in app/build/utils.js
1 1 2