aws-samples / amazon-rekognition-video-analyzer
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 646 units with 9,349 lines of code in units (82.1% of code).
    • 3 very long units (1,043 lines of code)
    • 13 long units (805 lines of code)
    • 116 medium size units (3,548 lines of code)
    • 128 small units (1,843 lines of code)
    • 386 very small units (2,110 lines of code)
11% | 8% | 37% | 19% | 22%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js10% | 8% | 37% | 20% | 23%
py16% | 8% | 49% | 11% | 13%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
web-ui/src/js10% | 8% | 37% | 20% | 23%
lambda/imageprocessor87% | 0% | 0% | 0% | 12%
ROOT0% | 16% | 53% | 16% | 13%
client0% | 0% | 83% | 16% | 0%
lambda/framefetcher0% | 0% | 61% | 0% | 38%
web-ui/src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
(function (global, factory)()
in web-ui/src/js/vue.js
825 91 2
function()
in web-ui/src/js/axios.js
117 42 3
def process_image()
in lambda/imageprocessor/imageprocessor.py
101 24 2
function enter()
in web-ui/src/js/vue.js
81 32 2
function processAttrs()
in web-ui/src/js/vue.js
69 18 1
function updateChildren()
in web-ui/src/js/vue.js
67 21 5
function utf8Slice()
in web-ui/src/js/axios.js
66 24 3
function parseFilters()
in web-ui/src/js/vue.js
66 38 1
function compileToFunctions()
in web-ui/src/js/vue.js
63 14 3
function utf8ToBytes()
in web-ui/src/js/axios.js
60 22 2
render: function render()
in web-ui/src/js/vue.js
59 24 1
function _createElement()
in web-ui/src/js/vue.js
56 15 5
function hydrate()
in web-ui/src/js/vue.js
56 21 3
56 20 2
function genData()
in web-ui/src/js/vue.js
55 18 1
def deletedata()
in build.py
51 7 3
Vue.extend = function()
in web-ui/src/js/vue.js
50 9 1
function assertProp()
in web-ui/src/js/vue.js
49 14 5
function createComponent()
in web-ui/src/js/vue.js
49 12 5
function createElm()
in web-ui/src/js/vue.js
49 16 5