microsoft / mixed-reality-extension-sdk
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,100 units with 8,857 lines of code in units (59.0% of code).
    • 0 very long units (0 lines of code)
    • 5 long units (327 lines of code)
    • 60 medium size units (1,765 lines of code)
    • 165 small units (2,326 lines of code)
    • 870 very small units (4,439 lines of code)
0% | 3% | 19% | 26% | 50%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 3% | 19% | 26% | 50%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
packages/sdk/src/core0% | 15% | 17% | 38% | 27%
packages/gltf-gen/src0% | 11% | 42% | 18% | 27%
packages/gltf-gen/src/geometry0% | 45% | 43% | 11% | 0%
packages/common/src/math0% | 1% | 13% | 16% | 68%
packages/sdk/src/internal0% | 0% | 29% | 32% | 38%
packages/sdk/src/asset0% | 0% | 18% | 36% | 44%
packages/sdk/src/util0% | 0% | 34% | 15% | 49%
packages/sdk/src/actor0% | 0% | 11% | 37% | 50%
packages/sdk/src/animation0% | 0% | 12% | 37% | 49%
packages/sdk/src/user0% | 0% | 10% | 44% | 44%
packages/altspacevr-extras/src0% | 0% | 0% | 65% | 34%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public constructor()
in packages/gltf-gen/src/geometry/capsule.ts
75 7 6
public serialize()
in packages/gltf-gen/src/material.ts
75 18 2
private createActorFromPayload()
in packages/sdk/src/core/contextInternal.ts
67 15 1
public invertToRef()
in packages/common/src/math/matrix.ts
59 3 1
public update()
in packages/sdk/src/core/contextInternal.ts
51 12 0
private _compute()
in packages/common/src/math/path3.ts
45 9 1
public constructor()
in packages/gltf-gen/src/geometry/sphere.ts
44 8 4
public static CreateCatmullRomSpline()
in packages/common/src/math/curve3.ts
43 6 3
public decompose()
in packages/common/src/math/matrix.ts
43 13 3
constructor()
in packages/sdk/src/internal/connection/webSocket.ts
43 7 2
public copy()
in packages/sdk/src/asset/material.ts
42 13 1
public generateGLTF()
in packages/gltf-gen/src/gltffactory.ts
40 7 0
public sendMessage()
in packages/sdk/src/internal/protocols/protocol.ts
40 9 4
function observeLeafProperties()
in packages/sdk/src/internal/util/observe.ts
40 11 3
public static Validate()
in packages/sdk/src/animation/animationData.ts
37 14 1
public constructor()
in packages/sdk/src/asset/material.ts
37 2 2
private _serializeIndices()
in packages/gltf-gen/src/meshprimitive.ts
36 9 2
public serialize()
in packages/gltf-gen/src/meshprimitive.ts
35 9 2
public cacheAssetCreation()
in packages/sdk/src/internal/adapters/multipeer/session.ts
35 12 3
public constructor()
in packages/sdk/src/util/webHost.ts
35 9 1