microsoft / mixed-reality-extension-sdk
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 1,100 units with 8,857 lines of code in units (59.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 20 medium complex units (661 lines of code)
    • 57 simple units (1,243 lines of code)
    • 1,023 very simple units (6,953 lines of code)
0% | 0% | 7% | 14% | 78%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
ts0% | 0% | 7% | 14% | 78%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/gltf-gen/src0% | 0% | 24% | 36% | 39%
packages/sdk/src/core0% | 0% | 15% | 5% | 78%
packages/sdk/src/internal0% | 0% | 8% | 25% | 66%
packages/common/src/math0% | 0% | 2% | 3% | 93%
packages/sdk/src/animation0% | 0% | 19% | 9% | 71%
packages/sdk/src/actor0% | 0% | 5% | 14% | 79%
packages/sdk/src/asset0% | 0% | 6% | 17% | 75%
packages/sdk/src/util0% | 0% | 9% | 19% | 71%
packages/gltf-gen/src/geometry0% | 0% | 0% | 71% | 28%
packages/sdk/src/user0% | 0% | 0% | 7% | 92%
packages/altspacevr-extras/src0% | 0% | 0% | 21% | 78%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public equals()
in packages/common/src/math/matrix.ts
19 22 1
public copy()
in packages/sdk/src/actor/actor.ts
24 20 1
public isIdentityAs3x2()
in packages/common/src/math/matrix.ts
16 18 0
public serialize()
in packages/gltf-gen/src/material.ts
75 18 2
public isIdentity()
in packages/common/src/math/matrix.ts
13 17 0
constructor()
in packages/gltf-gen/src/material.ts
23 15 1
private createActorFromPayload()
in packages/sdk/src/core/contextInternal.ts
67 15 1
private static _sizeof()
in packages/gltf-gen/src/vertexattributes.ts
31 14 2
public copy()
in packages/sdk/src/animation/animation.ts
19 14 1
public static Validate()
in packages/sdk/src/animation/animationData.ts
37 14 1
public decompose()
in packages/common/src/math/matrix.ts
43 13 3
constructor()
in packages/gltf-gen/src/vertex.ts
32 13 1
public copy()
in packages/sdk/src/asset/material.ts
42 13 1
private static getOffsetFromAlignment()
in packages/sdk/src/util/planarGridLayout.ts
32 13 3
public update()
in packages/sdk/src/core/contextInternal.ts
51 12 0
public cacheAssetCreation()
in packages/sdk/src/internal/adapters/multipeer/session.ts
35 12 3
constructor()
in packages/sdk/src/actor/physics/collider.ts
17 11 2
public copy()
in packages/sdk/src/actor/physics/rigidbody.ts
13 11 1
private setAuthoritativeClient()
in packages/sdk/src/internal/adapters/multipeer/session.ts
32 11 1
function observeLeafProperties()
in packages/sdk/src/internal/util/observe.ts
40 11 3