awslabs / aws-clustered-video-streams
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 47 units with 754 lines of code in units (30.4% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (137 lines of code)
    • 13 medium size units (440 lines of code)
    • 6 small units (81 lines of code)
    • 26 very small units (96 lines of code)
0% | 18% | 58% | 10% | 12%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 18% | 54% | 6% | 21%
py0% | 18% | 62% | 15% | 3%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/stale-playlist-detector0% | 23% | 48% | 8% | 19%
source/cfn-init-clustered-video-stream0% | 65% | 32% | 0% | 1%
source/cfn-global-table0% | 0% | 82% | 17% | 0%
source/dashboard0% | 0% | 73% | 0% | 26%
source/cfn-add-edge-lambda0% | 0% | 61% | 35% | 2%
source/cfn-s3copyobjects0% | 0% | 76% | 0% | 23%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
_onEnter: async function()
in source/stale-playlist-detector/detector.js
71 7 0
def create()
in source/cfn-init-clustered-video-stream/cfn-init-clustered-video-stream.py
66 12 2
$()
in source/dashboard/dashboard.js
46 4 1
constructor()
in source/stale-playlist-detector/detector.js
46 5 1
def global_table_update()
in source/cfn-global-table/cfn-global-table.py
44 10 2
constructor()
in source/stale-playlist-detector/playlist.js
42 2 1
def global_table_create()
in source/cfn-global-table/cfn-global-table.py
37 5 2
def delete()
in source/cfn-init-clustered-video-stream/cfn-init-clustered-video-stream.py
33 10 2
_onEnter: async function()
in source/stale-playlist-detector/playlist.js
32 4 1
def send()
in source/cfn-global-table/cfnresponse.py
31 5 7
def create()
in source/cfn-add-edge-lambda/cfn-add-edge-lambda.py
29 8 2
def delete()
in source/cfn-add-edge-lambda/cfn-add-edge-lambda.py
26 7 2
def create()
in source/cfn-s3copyobjects/cfn-s3copyobjects.py
26 12 2
var updateBlockingState = function()
in source/dashboard/dashboard.js
24 2 2
_onEnter: async function()
in source/stale-playlist-detector/playlist.js
24 2 0
def update_cache_behavior()
in source/cfn-add-edge-lambda/cfn-add-edge-lambda.py
17 8 2
def remove_cache_behavior()
in source/cfn-add-edge-lambda/cfn-add-edge-lambda.py
15 6 2
_onEnter: function()
in source/stale-playlist-detector/detector.js
13 3 0
def update_global_table()
in source/cfn-global-table/cfn-global-table.py
13 1 3
changed()
in source/stale-playlist-detector/playlist.js
12 3 1