microsoft / tsyringe
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 64 units with 799 lines of code in units (72.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (43 lines of code)
    • 6 simple units (219 lines of code)
    • 57 very simple units (537 lines of code)
0% | 0% | 5% | 27% | 67%
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% | 5% | 27% | 67%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 0% | 7% | 30% | 62%
src/decorators0% | 0% | 0% | 38% | 61%
src/providers0% | 0% | 0% | 0% | 100%
src/factories0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private resolveRegistration()
in src/dependency-container.ts
43 13 2
constructor()
in src/decorators/auto-injectable.ts
42 7 1
private resolveParams()
in src/dependency-container.ts
31 7 2
public registerSingleton()
in src/dependency-container.ts
46 6 2
public registerSingleton()
in src/dependency-container.ts
42 6 2
public registerSingleton()
in src/dependency-container.ts
38 6 2
private construct()
in src/dependency-container.ts
20 6 2
public resolve()
in src/dependency-container.ts
25 5 2
public isRegistered()
in src/dependency-container.ts
8 5 2
private executePreResolutionInterceptor()
in src/dependency-container.ts
15 4 2
private executePostResolutionInterceptor()
in src/dependency-container.ts
18 4 3
public resolveAll()
in src/dependency-container.ts
22 4 2
public createChildContainer()
in src/dependency-container.ts
24 4 0
export default function predicateAwareClassFactory()
in src/factories/predicate-aware-class-factory.ts
20 4 1
export function isProvider()
in src/providers/provider.ts
8 4 1
private getRegistration()
in src/dependency-container.ts
9 3 1
private getAllRegistrations()
in src/dependency-container.ts
11 3 1
export function isTokenDescriptor()
in src/providers/injection-token.ts
9 3 1
export function isTransformDescriptor()
in src/providers/injection-token.ts
9 3 1
export function getParamInfo()
in src/reflection-helpers.ts
9 3 1