microsoft / EmbeddedSocial-Service
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,434 units with 25,542 lines of code in units (53.1% of code).
    • 2 very complex units (632 lines of code)
    • 10 complex units (1,268 lines of code)
    • 46 medium complex units (3,265 lines of code)
    • 105 simple units (4,148 lines of code)
    • 1,271 very simple units (16,229 lines of code)
2% | 4% | 12% | 16% | 63%
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
cs2% | 4% | 12% | 16% | 63%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Server/CTStore15% | 3% | 14% | 10% | 56%
Server/Common1% | 4% | 8% | 15% | 70%
Tools/Ops0% | 16% | 28% | 12% | 42%
Tools/Developer0% | 47% | 0% | 16% | 36%
Server/DataFactory0% | 0% | 62% | 24% | 13%
Server/WebRole0% | 0% | 5% | 25% | 68%
External/LoggingEventSource0% | 0% | 24% | 18% | 56%
UtilsInternal0% | 0% | 12% | 19% | 68%
Server/Email0% | 0% | 91% | 0% | 8%
Server/AVERT0% | 0% | 64% | 0% | 35%
Server/Search0% | 0% | 13% | 27% | 59%
Server/WorkerRole0% | 0% | 0% | 32% | 67%
Server/WebRoleCommon0% | 0% | 0% | 13% | 86%
Server/PushNotificationsHub0% | 0% | 0% | 21% | 78%
Server/WebRoleMicrosoftInternal0% | 0% | 0% | 24% | 75%
Server/Messaging0% | 0% | 0% | 20% | 79%
Server/KVLibrary0% | 0% | 0% | 26% | 73%
Utils0% | 0% | 0% | 10% | 89%
Logging0% | 0% | 0% | 19% | 80%
Server/CVS0% | 0% | 0% | 16% | 83%
Server/OAuthLibrary0% | 0% | 0% | 0% | 100%
UtilsInternal/Config0% | 0% | 0% | 0% | 100%
Server/CBStore0% | 0% | 0% | 0% | 100%
Server/Metrics0% | 0% | 0% | 0% | 100%
Server/EventSources0% | 0% | 0% | 0% | 100%
Utils/Handles0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private RedisLuaScript BuildLuaScript()
in code/Server/CTStore/RedisCache.cs
468 68 1
private string ActivityViewToString()
in code/Server/Common/Managers/PushNotificationsManager.cs
164 53 2
private static void ParseArgs()
in code/Tools/Ops/ManageServerState/Program.cs
142 37 1
private static async Task ValidateAndPrintConfiguration()
in code/Tools/Ops/ManageServerState/Program.cs
93 37 2
public async Task GetActivityView()
in code/Server/Common/Managers/ViewsManager.cs
137 34 10
private static void ParseArgs()
in code/Tools/Ops/ManageRedis/Program.cs
144 34 1
private Operation GetPostOperation()
in code/Server/CTStore/ExecutionManager.cs
101 30 3
public static async Task AsyncMain()
in code/Tools/Ops/ManageServerState/Program.cs
127 30 1
private async Task GetTopicView()
in code/Server/Common/Managers/ViewsManager.cs
146 29 6
private static Action ParseAction()
in code/Tools/Ops/ManageApps/Program.cs
132 29 1
private static void AddXMsEnumToSwaggerJson()
in code/Tools/Developer/AddXMsEnumToSwaggerJson/Program.cs
103 28 2
public async Task SubmitContentForModeration()
in code/Server/Common/Managers/CVSModerationManager.cs
143 27 6
private async Task PerformAction()
in code/Tools/Ops/ManageApps/Program.cs
78 24 2
private T GetEntityFromBytes()
in code/Server/CTStore/RedisCache.cs
102 22 1
private void ParseValidationArgs()
in code/Tools/Ops/ManageApps/AppContentValidation.cs
115 21 1
private static Action ParseArgs()
in code/Tools/Ops/ManageQueues/Program.cs
101 20 1
public async Task SubmitUserForModeration()
in code/Server/Common/Managers/CVSModerationManager.cs
95 19 5
public async Task SubmitContentReportForReview()
in code/Server/Common/Managers/ReportsManager.cs
80 19 4
protected async Task UpdateRelationshipToUser()
in code/Server/WebRole/Controllers/RelationshipsControllerBase.cs
74 19 4
private void ParseAppProfileArgs()
in code/Tools/Ops/ManageApps/Apps.cs
86 18 1