microsoft / workbooks
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 3,345 units with 44,255 lines of code in units (54.6% of code).
    • 1 very complex units (143 lines of code)
    • 5 complex units (458 lines of code)
    • 116 medium complex units (5,557 lines of code)
    • 297 simple units (9,047 lines of code)
    • 2,926 very simple units (29,050 lines of code)
<1% | 1% | 12% | 20% | 65%
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
cs<1% | 1% | 13% | 20% | 64%
ts0% | 0% | 11% | 19% | 69%
tsx0% | 0% | 3% | 18% | 78%
cpp0% | 0% | 0% | 37% | 62%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Clients/Xamarin.Interactive.Client1% | 2% | 11% | 24% | 59%
Agents/Xamarin.Interactive0% | 3% | 15% | 16% | 65%
build/Xamarin.Build0% | 0% | 28% | 23% | 48%
Clients/Xamarin.Interactive.Client.Desktop0% | 0% | 14% | 19% | 65%
CodeAnalysis/Xamarin.Interactive.CodeAnalysis0% | 0% | 19% | 25% | 55%
Clients/Xamarin.Interactive.Client.Windows0% | 0% | 15% | 22% | 62%
Clients/Xamarin.Interactive.Client.Mac0% | 0% | 6% | 22% | 71%
ClientIntegrations/Xamarin.Workbooks.Client.iOS0% | 0% | 35% | 22% | 41%
Clients/Xamarin.Interactive.Client.Console0% | 0% | 12% | 22% | 65%
Clients/CrossBrowser0% | 0% | 6% | 7% | 85%
CodeAnalysis/Xamarin.Interactive.CodeAnalysis.Roslyn0% | 0% | 9% | 14% | 75%
Tools/InstallerVerifier0% | 0% | 33% | 10% | 56%
Agents/Xamarin.Interactive.Mac0% | 0% | 10% | 21% | 68%
Tools/ApiDump0% | 0% | 27% | 10% | 61%
Agents/Xamarin.Interactive.iOS0% | 0% | 14% | 34% | 50%
Tools/Xamarin.CITooling0% | 0% | 38% | 53% | 8%
WorkbookApps/Xamarin.Workbooks.WebAssembly0% | 0% | 16% | 8% | 74%
Clients/Xamarin.Interactive.Client.Web0% | 0% | 2% | 16% | 81%
Agents/Xamarin.Interactive.Forms0% | 0% | 20% | 44% | 35%
Agents/Xamarin.Interactive.Android0% | 0% | 8% | 10% | 81%
Agents/Xamarin.Interactive.Wpf0% | 0% | 0% | 53% | 46%
Agents/Xamarin.Interactive.Forms.Android0% | 0% | 0% | 40% | 59%
Agents/Xamarin.Interactive.Console0% | 0% | 0% | 60% | 39%
Clients/Xamarin.Interactive.Client.Windows.ShellExtension0% | 0% | 0% | 37% | 62%
Clients/Xamarin.Interactive.Client.Mac.SimChecker0% | 0% | 0% | 100% | 0%
Agents/Xamarin.Interactive.Forms.iOS0% | 0% | 0% | 16% | 83%
Tools/ILFixer0% | 0% | 0% | 19% | 80%
Clients/Xamarin.Interactive.MTouch0% | 0% | 0% | 9% | 90%
Agents/Xamarin.Interactive.DotNetCore0% | 0% | 0% | 0% | 100%
WorkbookApps/Xamarin.Workbooks.Android0% | 0% | 0% | 0% | 100%
WorkbookApps/Xamarin.Workbooks.iOS0% | 0% | 0% | 0% | 100%
WorkbookApps/Xamarin.Workbooks.Mac0% | 0% | 0% | 0% | 100%
WorkbookApps/Xamarin.Workbooks.Wpf0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void WriteSingleInline()
in Clients/Xamarin.Interactive.Client/CommonMark/MarkdownFormatter.cs
143 56 2
static Method ParseInternalMethodName()
in Agents/Xamarin.Interactive/Representations/Reflection/ReflectionRemoting.cs
106 34 1
public static int Run()
in Clients/Xamarin.Interactive.Client/CommandLineTool/Entry.cs
88 31 2
void WriteTypeName()
in Agents/Xamarin.Interactive/Representations/Reflection/ReflectionRemoting.cs
72 29 1
void WriteSingleBlock()
in Clients/Xamarin.Interactive.Client/CommonMark/MarkdownFormatter.cs
113 29 1
object ParseObject()
in Agents/Xamarin.Interactive/Collections/PropertyList.cs
79 26 1
async Task DoEvaluateCodeCellAsync()
in Clients/Xamarin.Interactive.Client/Workbook/Models/WorkbookPageViewModel.cs
60 24 2
public static InteractiveDiagnostic ToInteractiveDiagnostic()
in CodeAnalysis/Xamarin.Interactive.CodeAnalysis.Roslyn/ConversionExtensions.cs
46 23 1
private callMethod()
in WorkbookApps/Xamarin.Workbooks.WebAssembly/Client/runtime.ts
60 23 2
object Normalize()
in Agents/Xamarin.Interactive/Representations/RepresentationManager.cs
67 22 1
public void Save()
in Clients/Xamarin.Interactive.Client/Workbook/Models/WorkbookPackage.cs
49 21 1
void ValidateTrailer()
in Agents/Xamarin.Interactive/Collections/PropertyList.cs
52 20 0
static WrappedObject Inflate()
in Clients/CrossBrowser/Xamarin.CrossBrowser.Mac/WrappedObject.cs
44 20 1
private onKeyDown()
in Clients/Xamarin.Interactive.Client/ClientApp/workbook/code-editor.ts
19 20 1
async Task InitializeSimulatorAsync()
in ClientIntegrations/Xamarin.Workbooks.Client.iOS/iOSAgentProcess.cs
122 19 2
private visitTokenDispatcher()
in Clients/Xamarin.Interactive.Client/ClientApp/workbook/parser.ts
27 19 1
static string TranslatePattern()
in Agents/Xamarin.Interactive/ProcessControl/Glob.cs
48 18 1
public override string ToString()
in Agents/Xamarin.Interactive/Representations/Reflection/TypeSpec.cs
72 18 0
internal JSValue ToJSValue()
in Clients/CrossBrowser/Xamarin.CrossBrowser.Mac/ScriptContext.cs
40 18 1
void Locate()
in Clients/Xamarin.Interactive.Client.Mac/SystemInformation/VisualStudioForMacComponent.cs
56 18 0