microsoft / wil
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,271 units with 8,880 lines of code in units (34.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 15 medium complex units (862 lines of code)
    • 59 simple units (1,062 lines of code)
    • 1,197 very simple units (6,956 lines of code)
0% | 0% | 9% | 11% | 78%
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
h0% | 0% | 9% | 11% | 78%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
include/wil0% | 0% | 9% | 11% | 78%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
inline void LogFailure()
in include/wil/result_macros.h
95 25 6
inline HRESULT GetFailureLogString()
in include/wil/result_macros.h
101 23 1
inline HRESULT ResultFromKnownExceptions()
in include/wil/result_macros.h
78 22 4
89 16 1
72 15 4
79 14 2
void Flush()
in include/wil/Tracelogging.h
81 13 1
68 12 1
template static void EventId()
in include/wil/Tracelogging.h
16 11 10
template static void EventId()
in include/wil/Tracelogging.h
15 11 10
46 11 0
22 11 2
40 11 1
30 11 2
30 11 2
template void EventId()
in include/wil/Tracelogging.h
15 10 9
template void EventId()
in include/wil/Tracelogging.h
14 10 9
template static void EventId()
in include/wil/Tracelogging.h
15 10 9
template static void EventId()
in include/wil/Tracelogging.h
14 10 9
template static void EventId()
in include/wil/Tracelogging.h
15 10 10