microsoft / GraphEngine
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,616 units with 46,655 lines of code in units (53.1% of code).
    • 0 very complex units (0 lines of code)
    • 10 complex units (1,385 lines of code)
    • 80 medium complex units (4,627 lines of code)
    • 233 simple units (7,426 lines of code)
    • 4,293 very simple units (33,217 lines of code)
0% | 2% | 9% | 15% | 71%
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
cs0% | 3% | 7% | 14% | 74%
cpp0% | 3% | 17% | 22% | 56%
hpp0% | 0% | 12% | 9% | 78%
h0% | 0% | 6% | 14% | 78%
scala0% | 0% | 29% | 0% | 70%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/Trinity.TSL0% | 5% | 9% | 17% | 66%
src/Trinity.C0% | 3% | 15% | 19% | 61%
src/Trinity.VSExtension0% | 20% | 7% | 28% | 43%
src/Modules0% | 1% | 4% | 9% | 84%
src/Trinity.Core0% | 1% | 8% | 16% | 73%
src/Trinity.C.UnitTest0% | 0% | 12% | 9% | 78%
src/GraphEngine.DataImporter0% | 0% | 19% | 28% | 52%
src/Trinity.Core.SmokeTest0% | 0% | 0% | 50% | 49%
src/Trinity.Core.UnitTest0% | 0% | 0% | 0% | 100%
tools/versioning0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public void MODULE_CALL()
in src/Trinity.TSL/Trinity.TSL.Metagen/VM.cs
379 49 0
internal static string GetResourceName()
in src/Trinity.Core/Trinity/Lib/ThrowHelper.cs
99 47 1
void MemoryTrunk::DefragmentTwoRegion()
in src/Trinity.C/src/Storage/MemoryTrunk/MemoryTrunk.DefragTwoRegion.cpp
176 41 3
private TSLCompletionState GetCompletionState()
in src/Trinity.VSExtension/TrinityVSExtension/EditorExtension/AutoCompletion/CompletionSource.cs
84 34 1
private List BuildSyntaxSpans()
in src/Trinity.VSExtension/TrinityVSExtension/EditorExtension/TSL/TSLParser.cs
141 31 2
private List _PullSelectionsAndAssembleResults()
in src/Modules/LIKQ/FanoutSearch/Core/FanoutSearchModule.Core.cs
146 30 3
bool NFieldType::is_assignable_from()
in src/Trinity.TSL/Trinity.TSL.Parser/SyntaxNode.cpp
46 30 1
private List SearchSubString()
in src/Trinity.TSL/Trinity.TSL.CodeTemplates/InvertedIndex/Bigram/Searcher.cs
116 28 1
internal List SubstringSearch()
in src/Trinity.TSL/Trinity.TSL.CodeTemplates/InvertedIndex/Bigram/Searcher.cs
106 27 1
VOID PrintExceptionRecord()
in src/Trinity.C/src/Debugger/Debugger.Exception.cpp
92 26 1
static bool _CalculateLockDependency()
in src/Trinity.C/src/Storage/LocalStorage/ThreadContext.cpp
79 25 2
private List GetExecutionCommands()
in src/Trinity.VSExtension/TrinityVSExtension/EditorExtension/AutoCompletion/CompletionHandler.cs
87 25 4
clara::Parser makeCommandLineParser()
in src/Trinity.C.UnitTest/catch.hpp
175 24 1
void XmlEncode::encodeTo()
in src/Trinity.C.UnitTest/catch.hpp
62 24 1
void MemoryTrunk::DefragmentOneRegion()
in src/Trinity.C/src/Storage/MemoryTrunk/MemoryTrunk.DefragOneRegion.cpp
115 24 3
private void _LoadWriteAheadLogFile()
in src/Trinity.Core/Storage/LocalMemoryStorage/LocalMemoryStorage.WriteAheadLog.cs
131 24 0
internal static string GetArgumentName()
in src/Trinity.Core/Trinity/Lib/ThrowHelper.cs
53 24 1
internal static int SameHost()
in src/Trinity.Core/Utilities/Network/NetworkUtility.cs
62 24 2
internal static FieldType GetFieldType()
in src/GraphEngine.DataImporter/GraphEngine.DataImporter/RDFUtils.cs
52 23 1
internal IndexQueryTreeNode Optimize()
in src/Trinity.TSL/Trinity.TSL.CodeTemplates/LINQ/IndexQueryTreeNode.cs
65 23 0