microsoft / AMBROSIA
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,669 units with 33,488 lines of code in units (75.5% of code).
    • 5 very complex units (1,354 lines of code)
    • 25 complex units (3,498 lines of code)
    • 66 medium complex units (4,357 lines of code)
    • 134 simple units (5,248 lines of code)
    • 1,439 very simple units (19,031 lines of code)
4% | 10% | 13% | 15% | 56%
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
ts9% | 16% | 21% | 18% | 34%
cs1% | 7% | 8% | 13% | 68%
js0% | 46% | 0% | 53% | 0%
c0% | 0% | 18% | 34% | 46%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Clients7% | 16% | 17% | 21% | 37%
InternalImmortals11% | 5% | 12% | 13% | 57%
AmbrosiaTest0% | 6% | 4% | 4% | 84%
AmbrosiaLib0% | 13% | 21% | 23% | 41%
SharedAmbrosiaTools0% | 0% | 12% | 15% | 71%
ImmortalCoordinator0% | 0% | 47% | 0% | 52%
GenericLogPicker0% | 0% | 0% | 20% | 79%
Ambrosia0% | 0% | 0% | 46% | 53%
AzureBlobsLogPicker0% | 0% | 0% | 27% | 72%
DevTools0% | 0% | 0% | 100% | 0%
UWPLogPicker0% | 0% | 0% | 0% | 100%
ICGUI0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private static walkAST()
in Clients/AmbrosiaJS/Ambrosia-Node/src/Meta.ts
256 81 2
async function main()
in Clients/AmbrosiaJS/PTI-Node/App/src/Main.ts
274 61 0
private static tokenizeComplexType()
in Clients/AmbrosiaJS/Ambrosia-Node/src/Meta.ts
171 54 2
function runUnitTests()
in Clients/AmbrosiaJS/Ambrosia-Node/src/UnitTests.ts
291 52 1
public override async Task DispatchToMethod()
in InternalImmortals/XamarinSample/GeneratedSourceFiles/XamarinSampleCommAPIGened/latest/Dispatcher_IXamarinSampleComm.cs
362 52 6
private static isConstructedBuiltInObject()
in Clients/AmbrosiaJS/Ambrosia-Node/src/Meta.ts
51 46 1
private async Task ReplayAsync()
in AmbrosiaLib/Ambrosia/Program.cs
285 44 2
function emitConsumerTypeScriptFile()
in Clients/AmbrosiaJS/Ambrosia-Node/src/Meta.ts
246 44 3
public void CallAMB()
in AmbrosiaTest/AmbrosiaTest/Utilities.cs
98 41 3
public static unsafe void BlockCopy()
in AmbrosiaLib/Ambrosia/xxHash.cs
219 39 5
public void JS_VerifyTimeTravelDebugging()
in AmbrosiaTest/AmbrosiaTest/JS_Utilities.cs
148 39 13
function dispatcher()
in Clients/AmbrosiaJS/Ambrosia-Node/src/ICTest.ts
204 38 1
function codeGen()
in Clients/AmbrosiaJS/Ambrosia-Node/src/Meta.ts
143 38 3
function checkType()
in Clients/AmbrosiaJS/Ambrosia-Node/src/Meta.ts
119 37 6
private static void RunCodeGen()
in Clients/CSharp/AmbrosiaCS/Program.cs
197 37 0
protected async Task Dispatch()
in Clients/CSharp/AmbrosiaLibCS/Immortal.cs
267 35 1
export function processLogPage()
in Clients/AmbrosiaJS/Ambrosia-Node/src/Messages.ts
210 34 3
function reviver()
in Clients/AmbrosiaJS/Ambrosia-Node/src/Utils/Serialization.ts
76 34 2
const postInterceptDispatcher = function()
in Clients/AmbrosiaJS/Ambrosia-Node/src/ICProcess.ts
123 33 1
function step()
in AmbrosiaTest/JSTest/TestCodeGen.js
22 32 1