aws-solutions / aws-media-services-application-mapper
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 695 units with 10,132 lines of code in units (83.9% of code).
    • 4 very long units (582 lines of code)
    • 32 long units (2,282 lines of code)
    • 118 medium size units (3,483 lines of code)
    • 122 small units (1,812 lines of code)
    • 419 very small units (1,973 lines of code)
5% | 22% | 34% | 17% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js7% | 25% | 25% | 18% | 23%
py0% | 14% | 58% | 17% | 9%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/html/js/app7% | 25% | 25% | 18% | 23%
source/msam/chalicelib0% | 14% | 60% | 17% | 6%
source/events0% | 60% | 39% | 0% | 0%
source/msam/db0% | 0% | 66% | 17% | 16%
source/tools0% | 0% | 100% | 0% | 0%
source/web-cloudformation0% | 0% | 40% | 42% | 16%
deployment0% | 0% | 0% | 100% | 0%
source/msam0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function()
in source/html/js/app/ui/event_alert_indicators.js
171 50 5
function()
in source/html/js/app/ui/user_defined.js
167 15 5
function()
in source/html/js/app/ui/tile_view.js
129 15 12
function()
in source/html/js/app/ui/monitor_view.js
115 2 9
def ssm_run_command()
in source/msam/chalicelib/periodic.py
98 18 0
const update_distributions = function()
in source/html/js/app/mappers/nodes/cloudfront.js
98 4 0
const update_endpoints = function()
in source/html/js/app/mappers/nodes/mediapackage.js
93 2 0
const update_channels = function()
in source/html/js/app/mappers/nodes/mediapackage.js
92 2 0
const update_buckets = function()
in source/html/js/app/mappers/nodes/s3.js
91 2 0
const update_containers = function()
in source/html/js/app/mappers/nodes/mediastore.js
90 2 0
const update_user_defined = function()
in source/html/js/app/mappers/nodes/user_defined_node.js
90 3 0
const update_speke_keyservers = function()
in source/html/js/app/mappers/nodes/speke.js
84 2 0
var map_config = function()
in source/html/js/app/mappers/nodes/ssm_managed_instance.js
82 3 1
const map_config = function()
in source/html/js/app/mappers/nodes/ec2.js
82 3 1
_onEnter: function()
in source/html/js/app/ui/diagram_statemachine_factory.js
82 17 0
const map_flow = function()
in source/html/js/app/mappers/nodes/mediaconnect.js
80 1 1
function()
in source/html/js/app/statemachine.js
78 1 9
var map_config = function()
in source/html/js/app/mappers/nodes/mediatailor.js
77 1 1
const map_device = function()
in source/html/js/app/mappers/nodes/medialive.js
75 1 1
def lambda_handler()
in source/events/media_events.py
71 20 2