microsoft / ClearScript
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 4,441 units with 54,415 lines of code in units (64.8% of code).
    • 0 very complex units (0 lines of code)
    • 7 complex units (961 lines of code)
    • 47 medium complex units (2,918 lines of code)
    • 107 simple units (3,372 lines of code)
    • 4,280 very simple units (47,164 lines of code)
0% | 1% | 5% | 6% | 86%
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
cpp0% | 13% | 1% | 22% | 63%
cs0% | <1% | 5% | 5% | 88%
h0% | 0% | 0% | 3% | 96%
js0% | 0% | 0% | 0% | 100%
vbs0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ClearScriptV80% | 10% | 1% | 17% | 71%
ClearScript0% | 1% | 10% | 8% | 79%
ClearScriptBenchmarks0% | 0% | 60% | 22% | 16%
ClearScriptTest0% | 0% | 0% | <1% | 99%
ClearScriptConsole0% | 0% | 0% | 58% | 41%
UWP0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void V8ContextImpl::Verify()
in ClearScriptV8/V8ContextImpl.cpp
170 38 2
V8Value V8ContextImpl::ExportValue()
in ClearScriptV8/V8ContextImpl.cpp
159 37 1
private object InvokeHostMember()
in ClearScript/HostItem.cs
140 34 6
private object GetHostProperty()
in ClearScript/HostItem.cs
131 33 7
v8::Local V8ContextImpl::ImportValue()
in ClearScriptV8/V8ContextImpl.cpp
156 33 1
internal override object MarshalToScript()
in ClearScript/V8/V8ScriptEngine.cs
98 32 2
107 29 4
private object MarshalToScriptInternal()
in ClearScript/Windows/Core/WindowsScriptEngine.cs
77 23 3
private object SetHostProperty()
in ClearScript/HostItem.cs
79 22 5
public static bool IsAssignableFrom()
in ClearScript/Util/TypeHelpers.cs
73 22 2
public static void Set()
in ClearScript/V8/SplitProxy/V8SplitProxyHelpers.cs
138 21 2
public static bool TryBindAndInvoke()
in ClearScript/Util/DynamicHelpers.cs
84 20 4
public async Task ReceiveMessageAsync()
in ClearScript/Util/Web/WebSocket.cs
100 20 0
protected override bool TryBindAndInvoke()
in ClearScript/V8/V8ScriptItem.cs
74 19 3
public static void Main()
in ClearScriptBenchmarks/ClearScriptBenchmarks.Windows.cs
84 19 1
public static async Task CreateAsync()
in ClearScript/Util/Web/WebContext.cs
94 18 1
public static object Wrap()
in ClearScript/V8/V8ScriptItem.cs
50 18 2
public function getCommandResult()
in ClearScript/Windows/Core/VBScriptEngine.cs
137 18 1
private bool TryGetScriptError()
in ClearScript/Windows/Core/WindowsScriptItem.cs
57 18 2
public static void Main()
in ClearScriptBenchmarks/ClearScriptBenchmarks.Unix.cs
79 18 1