aws-samples / amazon-sumerian-hosts
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 538 units with 5,749 lines of code in units (59.9% of code).
    • 3 very long units (389 lines of code)
    • 8 long units (529 lines of code)
    • 51 medium size units (1,524 lines of code)
    • 88 small units (1,274 lines of code)
    • 388 very small units (2,033 lines of code)
6% | 9% | 26% | 22% | 35%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js6% | 9% | 26% | 22% | 35%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
docs_template37% | 0% | 25% | 12% | 24%
src/core/animpack5% | 0% | 29% | 24% | 40%
src/core7% | 17% | 23% | 24% | 27%
src/core/awspack0% | 24% | 30% | 18% | 26%
src/Babylon.js/animpack0% | 0% | 16% | 23% | 59%
src/three.js/animpack0% | 0% | 21% | 0% | 78%
src/Babylon.js/awspack0% | 0% | 51% | 27% | 20%
src/Babylon.js0% | 0% | 0% | 16% | 83%
src/three.js0% | 0% | 0% | 27% | 72%
src/three.js/awspack0% | 0% | 0% | 37% | 62%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function buildNav()
in docs_template/publish.js
155 22 1
static Mixin()
in src/core/animpack/AnimationPlayerInterface.js
122 22 1
static getDelaunayTriangulation()
in src/core/MathUtils.js
112 18 1
static all()
in src/core/Deferred.js
86 15 4
_synthesizeSpeechmarks()
in src/core/awspack/AbstractTextToSpeechFeature.js
74 10 1
async _onViseme()
in src/core/LipsyncFeature.js
70 9 1
constructor()
in src/core/Deferred.js
69 14 1
_startSpeech()
in src/core/awspack/AbstractTextToSpeechFeature.js
67 13 3
static initializeService()
in src/core/awspack/AbstractTextToSpeechFeature.js
59 9 3
static autoGenerateSSMLMarks()
in src/core/awspack/TextToSpeechUtils.js
53 10 3
_setMacroSaccade()
in src/core/PointOfInterestFeature.js
51 11 1
static addMarksToUnmarkedSentences()
in src/core/awspack/TextToSpeechUtils.js
46 5 2
async _animateHeldViseme()
in src/core/LipsyncFeature.js
45 5 9
_setInfluenceClosestPointInTriangles()
in src/core/animpack/state/Blend2dState.js
44 4 1
_setLookAngles()
in src/core/PointOfInterestFeature.js
42 2 0
playNextAnimation()
in src/core/animpack/AnimationFeature.js
41 10 4
installApi()
in src/core/animpack/AnimationFeature.js
41 1 0
static wait()
in src/core/Utils.js
40 10 5
_createPromise()
in src/core/awspack/AbstractSpeech.js
40 4 3
playAnimation()
in src/core/animpack/AnimationFeature.js
40 4 4