microsoft / BPerf
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,236 units with 59,187 lines of code in units (24.2% of code).
    • 17 very complex units (5,321 lines of code)
    • 25 complex units (3,940 lines of code)
    • 130 medium complex units (9,635 lines of code)
    • 214 simple units (8,016 lines of code)
    • 3,850 very simple units (32,275 lines of code)
8% | 6% | 16% | 13% | 54%
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
cpp13% | 12% | 22% | 19% | 31%
inl18% | 0% | 6% | 3% | 71%
h3% | 5% | 9% | 6% | 74%
cs0% | 0% | 19% | 18% | 61%
c0% | 0% | 22% | 11% | 66%
hpp0% | 0% | 8% | 5% | 85%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
CoreCLRProfiler/native10% | 7% | 16% | 11% | 53%
CPUSamplesCollector/Windows0% | 10% | 17% | 30% | 41%
WebViewer/Microsoft.Diagnostics.Tracing.Stacks0% | 0% | 24% | 17% | 57%
WebViewer/Microsoft.BPerf.StackInformation.Etw0% | 0% | 29% | 17% | 52%
CPUSamplesCollector/Linux0% | 0% | 23% | 15% | 61%
WebViewer/Microsoft.BPerf.StackViewer0% | 0% | 11% | 9% | 78%
WebViewer/Microsoft.BPerf.SymbolicInformation.ProgramDatabase0% | 0% | 8% | 43% | 48%
WebViewer/Microsoft.BPerf.Internal.CabExtraction0% | 0% | 0% | 40% | 59%
CoreCLRProfiler/managed0% | 0% | 0% | 0% | 100%
WebViewer/Microsoft.BPerf.ModuleInformation.Abstractions0% | 0% | 0% | 0% | 100%
WebViewer/Microsoft.BPerf.StackAggregation0% | 0% | 0% | 0% | 100%
WebViewer/Microsoft.BPerf.SymbolicInformation.Interfaces0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
inl
int __cdecl __tinput_s()
in CoreCLRProfiler/native/coreclr_headers/src/pal/src/safecrt/input.inl
770 188 3
inline CORINFO_InstructionSetFlags EnsureInstructionSetFlagsAreValid()
in CoreCLRProfiler/native/coreclr_headers/src/inc/corinfoinstructionset.h
186 172 1
inl
_CRTIMP int __cdecl _vtcprintf_l()
in CoreCLRProfiler/native/coreclr_headers/src/pal/src/safecrt/output.inl
558 134 6
_CRTIMP int __cdecl _vtcprintf_l()
in CoreCLRProfiler/native/coreclr_headers/src/pal/src/safecrt/safecrt_output_l.cpp
524 127 6
BOOL Internal_ExtractFormatW()
in CoreCLRProfiler/native/coreclr_headers/src/pal/src/cruntime/printfcpp.cpp
285 79 8
BOOL Internal_ExtractFormatA()
in CoreCLRProfiler/native/coreclr_headers/src/pal/src/cruntime/printfcpp.cpp
264 73 8
BOOL Silent_ExtractFormatA()
in CoreCLRProfiler/native/coreclr_headers/src/pal/src/cruntime/silent_printf.cpp
232 70 7
inl
errno_t __cdecl _FUNC_NAME()
in CoreCLRProfiler/native/coreclr_headers/src/pal/src/safecrt/tsplitpath_s.inl
199 63 2
PCCOR_SIGNATURE PrettyPrintType()
in CoreCLRProfiler/native/coreclr_headers/src/inc/formattype.cpp
254 61 3
DWORD CorUnix::InternalWaitForMultipleObjectsEx()
in CoreCLRProfiler/native/coreclr_headers/src/pal/src/synchmgr/wait.cpp
317 60 7
int GetChars()
in CoreCLRProfiler/native/coreclr_headers/src/pal/src/locale/utf8.cpp
337 59 4
static BOOL Internal_ScanfExtractFormatA()
in CoreCLRProfiler/native/coreclr_headers/src/pal/src/cruntime/printf.cpp
252 57 7
static BOOL Internal_ScanfExtractFormatW()
in CoreCLRProfiler/native/coreclr_headers/src/pal/src/cruntime/printf.cpp
223 57 7
errno_t __cdecl _splitpath_s()
in CoreCLRProfiler/native/coreclr_headers/src/pal/inc/rt/safecrt.h
175 56 9
int GetByteCount()
in CoreCLRProfiler/native/coreclr_headers/src/pal/src/locale/utf8.cpp
220 56 2
int CoreVfwprintf()
in CoreCLRProfiler/native/coreclr_headers/src/pal/src/cruntime/printfcpp.cpp
362 55 4
errno_t __cdecl _wsplitpath_s()
in CoreCLRProfiler/native/coreclr_headers/src/pal/inc/rt/safecrt.h
163 54 9
int GetBytes()
in CoreCLRProfiler/native/coreclr_headers/src/pal/src/locale/utf8.cpp
262 50 4
static PCCOR_SIGNATURE PrettyPrintType()
in CoreCLRProfiler/native/PrettyPrintSig.cpp
211 49 4
HRESULT ReadAndSetupConfiguration()
in CPUSamplesCollector/Windows/lib/Program.cpp
202 47 2