microsoft / CLRInstrumentationEngine
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 2,105 units with 32,080 lines of code in units (40.4% of code).
    • 1 very complex units (242 lines of code)
    • 4 complex units (656 lines of code)
    • 36 medium complex units (3,530 lines of code)
    • 108 simple units (4,590 lines of code)
    • 1,956 very simple units (23,062 lines of code)
<1% | 2% | 11% | 14% | 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
cpp1% | 1% | 13% | 18% | 65%
cs0% | 39% | 7% | 6% | 46%
h0% | 0% | 7% | 8% | 83%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/InstrumentationEngine1% | 1% | 17% | 16% | 63%
src/Extensions.Base.Api0% | 37% | 0% | 0% | 62%
src/InstrumentationEngine.Attach0% | 52% | 24% | 0% | 23%
src/unix0% | 0% | 3% | 15% | 80%
src/InstrumentationEngine.Lib0% | 0% | 14% | 19% | 66%
inc/clr0% | 0% | 8% | 5% | 85%
src/Common.Lib0% | 0% | 4% | 5% | 89%
src/InstrumentationEngine.ProfilerProxy0% | 0% | 27% | 43% | 28%
src/ExtensionsCommon0% | 0% | 1% | 5% | 93%
src/Extensions.BaseLib0% | 0% | 0% | 11% | 88%
build/Tasks0% | 0% | 0% | 100% | 0%
src/InstrumentationEngine.XdtExtensions0% | 0% | 0% | 76% | 23%
src/TestHostExtension0% | 0% | 0% | 0% | 100%
src/Common.Headers0% | 0% | 0% | 0% | 100%
src/InstrumentationEngine.ProfilerProxy.Lib0% | 0% | 0% | 0% | 100%
src/Extensions.Base0% | 0% | 0% | 0% | 100%
src/InstrumentationEngine.Api0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
242 53 4
HRESULT MicrosoftInstrumentationEngine::AssemblyInjector::ConvertILCode()
in src/InstrumentationEngine/AssemblyInjector.cpp
100 30 1
public static void ApplicationInsights_RemoveCallbacks()
in src/Extensions.Base.Api/PublicContract.cs
244 29 2
123 29 1
private static int Attach()
in src/InstrumentationEngine.Attach/CommandHandler/AttachCommandHandler.cs
189 27 5
unsigned __stdcall SectEH_Emit()
in src/InstrumentationEngine/CorHeaders.cpp
78 22 3
85 22 1
HRESULT MicrosoftInstrumentationEngine::CCorProfilerInfoWrapper::QueryInterface()
in src/InstrumentationEngine/CorProfilerInfoWrapper.cpp
75 21 2
inline BOOL Base64Encode()
in src/unix/inc/atl/atlenc.h
87 21 1
HRESULT MicrosoftInstrumentationEngine::AssemblyInjector::ImportTypeDef()
in src/InstrumentationEngine/AssemblyInjector.cpp
161 20 2
203 19 2
49 19 1
36 19 2
HRESULT CConfigurationLoaderHelper::ProcessInstrumentationMethodNode()
in src/InstrumentationEngine.Lib/ConfigurationLoader.cpp
96 18 3
DWORD WINAPI CProfilerManager::ParseAttachConfigurationThreadProc()
in src/InstrumentationEngine/ProfilerManager.cpp
121 18 1
static HRESULT GetLatestVersionFolder()
in src/InstrumentationEngine.ProfilerProxy/dllmain.cpp
60 17 3
private static bool TryParseInstrumentationMethodConfiguration()
in src/InstrumentationEngine.Attach/CommandHandler/AttachCommandHandler.cs
87 16 3
166 16 1
84 16 3
HRESULT CProfilerManager::AddRawProfilerHook()
in src/InstrumentationEngine/ProfilerManager.cpp
109 16 1