aws-solutions / media2cloud
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 1,649 units with 17,702 lines of code in units (56.0% of code).
    • 2 very long units (249 lines of code)
    • 33 long units (2,015 lines of code)
    • 223 medium size units (6,767 lines of code)
    • 255 small units (3,783 lines of code)
    • 1,136 very small units (4,888 lines of code)
1% | 11% | 38% | 21% | 27%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js1% | 11% | 38% | 21% | 27%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/webapp2% | 17% | 38% | 18% | 22%
source/ingest0% | 14% | 34% | 24% | 25%
source/analysis-monitor0% | 21% | 31% | 30% | 15%
source/layers0% | 5% | 32% | 25% | 36%
source/video-analysis0% | 6% | 15% | 9% | 68%
source/gt-labeling0% | 12% | 36% | 39% | 11%
source/api0% | 0% | 59% | 20% | 19%
source/custom-resources0% | 0% | 49% | 21% | 29%
source/audio-analysis0% | 0% | 37% | 27% | 34%
source/s3event0% | 0% | 55% | 16% | 27%
source/document-analysis0% | 0% | 28% | 22% | 49%
source/error-handler0% | 0% | 100% | 0% | 0%
source/image-analysis0% | 0% | 0% | 55% | 44%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
domInit()
in source/webapp/src/lib/js/labelEditor.js
125 1 0
async domInit()
in source/webapp/src/lib/js/resetPasswordModal.js
124 6 0
domInit()
in source/webapp/src/lib/js/imageEditor.js
92 3 0
toggleTrack()
in source/webapp/src/lib/js/imagePreview.js
82 18 2
async domInit()
in source/webapp/src/lib/js/imageCard.js
69 7 1
async domCreateCarouselSlideCollection()
in source/webapp/src/lib/js/videoPreview.js
69 1 2
async domCreateCarouselSlideCollection()
in source/webapp/src/lib/js/imagePreview.js
67 1 2
createCarouselSlideUpload()
in source/webapp/src/lib/js/jsonUploadWizard.js
65 1 1
static get Constants()
in source/webapp/src/lib/js/mediaUploadWizard.js
65 1 0
createCarouselSlideTeamMembers()
in source/webapp/src/lib/js/workteam.js
65 1 0
async domInit()
in source/webapp/src/lib/js/videoCard.js
65 8 1
async onModify()
in source/webapp/src/lib/js/labelEditor.js
64 11 2
registerEvents()
in source/webapp/src/lib/js/settingsTabPanel.js
64 4 0
async update()
in source/layers/core-lib/lib/db.js
64 12 4
async domNewPasswordInit()
in source/webapp/src/lib/js/signInModal.js
61 4 0
registerEvents()
in source/webapp/src/lib/js/signInModal.js
61 7 0
async domCreateCarouselSlideSummary()
in source/webapp/src/lib/js/videoPreview.js
60 8 2
createCarouselSlidePrivateTeam()
in source/webapp/src/lib/js/workteam.js
60 1 0
async createTrack()
in source/video-analysis/lib/rekognition/base.js
60 10 1
createKeyValueInput()
in source/webapp/src/lib/js/mediaUploadWizard.js
59 10 7