microsoft / ctsTraffic
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 873 units with 16,470 lines of code in units (43.6% of code).
    • 2 very complex units (534 lines of code)
    • 8 complex units (1,322 lines of code)
    • 32 medium complex units (2,605 lines of code)
    • 78 simple units (3,896 lines of code)
    • 753 very simple units (8,113 lines of code)
3% | 8% | 15% | 23% | 49%
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
cpp4% | 10% | 20% | 29% | 34%
hpp0% | 3% | 6% | 14% | 74%
h0% | 0% | 12% | 6% | 81%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ctsTraffic5% | 11% | 23% | 31% | 28%
ctsPerf0% | 8% | 10% | 21% | 60%
ctl0% | 0% | 3% | 9% | 86%
MSTest/ctsIOPatternProtocolPolicyUnitTest0% | 0% | 0% | 14% | 85%
MSTest/ctsIOPatternStateUnitTest0% | 0% | 0% | 32% | 67%
SdkChanges0% | 0% | 0% | 0% | 100%
MSTest/ctsMediaStreamServerConnectedSocketUnitTest0% | 0% | 0% | 0% | 100%
MSTest/ctsSocketBrokerUnitTest0% | 0% | 0% | 0% | 100%
MSTest/ctsSocketStateUnitTest0% | 0% | 0% | 0% | 100%
MSTest/ctsIOPatternUnitTest_Server0% | 0% | 0% | 0% | 100%
MSTest/ctsIOPatternUnitTest_Client0% | 0% | 0% | 0% | 100%
MSTest/ctsSocketUnitTest0% | 0% | 0% | 0% | 100%
MSTest/ctsIOPatternRateLimitPolicyUnitTest0% | 0% | 0% | 0% | 100%
MSTest/ctsMediaStreamSendBuffer0% | 0% | 0% | 0% | 100%
MSTest/ctsStatisticsUnitTest0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void PrintSettings()
in ctsTraffic/ctsConfig.cpp
323 52 0
bool Startup()
in ctsTraffic/ctsConfig.cpp
211 51 2
static void ParseForIoPattern()
in ctsTraffic/ctsConfig.cpp
196 36 1
int __cdecl wmain()
in ctsPerf/ctsPerf.cpp
199 34 2
static void ParseForAddress()
in ctsTraffic/ctsConfig.cpp
167 32 1
ctsIoStatus ctsIoPattern::CompleteIo()
in ctsTraffic/ctsIOPattern.cpp
120 32 3
int SetPreBindOptions()
in ctsTraffic/ctsConfig.cpp
199 28 2
void PrintConnectionResults()
in ctsTraffic/ctsConfig.cpp
125 27 4
170 27 2
static void ParseForLogging()
in ctsTraffic/ctsConfig.cpp
146 26 1
void PrintConnectionResults()
in ctsTraffic/ctsConfig.cpp
125 22 4
void ctsReadWriteIocp()
in ctsTraffic/ctsReadWriteIocp.cpp
117 22 1
int __cdecl wmain()
in ctsTraffic/ctsTraffic.cpp
146 19 2
void ctsWSASocket()
in ctsTraffic/ctsWSASocket.cpp
115 19 1
static ctsSendRecvStatus ctsSendRecvProcessTask()
in ctsTraffic/ctsSendRecvIocp.cpp
106 18 4
void PrintStatusUpdate()
in ctsTraffic/ctsConfig.cpp
63 17 0
void PrintConnectionResults()
in ctsTraffic/ctsConfig.cpp
100 17 1
114 16 3
bool UpdateEstats()
in ctsPerf/ctsEstats.h
80 16 0
ctsTask ctsIoPattern::CreateNewTask()
in ctsTraffic/ctsIOPattern.cpp
133 16 2