microsoft / AIforEarth-API-Platform
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 81 units with 982 lines of code in units (38.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (146 lines of code)
    • 4 simple units (191 lines of code)
    • 76 very simple units (645 lines of code)
0% | 0% | 14% | 19% | 65%
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
cs0% | 0% | 22% | 29% | 47%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ProcessManager/CacheManager0% | 0% | 55% | 16% | 28%
ProcessManager/RequestReporter0% | 0% | 0% | 78% | 21%
ProcessManager/BackendWebhook0% | 0% | 0% | 94% | 5%
APIs/1.00% | 0% | 0% | 0% | 100%
ProcessManager/Libraries0% | 0% | 0% | 0% | 100%
ProcessManager/BackendQueueProcessor0% | 0% | 0% | 0% | 100%
Containers/Common0% | 0% | 0% | 0% | 100%
Containers/base-py0% | 0% | 0% | 0% | 100%
APIManagement0% | 0% | 0% | 0% | 100%
ProcessManager/TaskProcessLogger0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public static async Task TaskRun()
in ProcessManager/CacheManager/CacheConnectorUpsert.cs
146 19 3
public static async Task Run()
in ProcessManager/RequestReporter/CurrentProcessingGet.cs
47 7 3
public static async Task Run()
in ProcessManager/BackendWebhook/BackendWebhook.cs
48 6 3
public static async Task Run()
in ProcessManager/CacheManager/CacheConnectorGet.cs
43 6 3
public static async Task Run()
in ProcessManager/RequestReporter/CurrentProcessingUpsert.cs
53 6 3
private static async Task UpdateTaskStatus()
in ProcessManager/BackendQueueProcessor/BackendQueueProcessor.cs
47 5 6
def api_func()
in APIs/1.0/base-py/ai4e_service.py
25 4 11
def _log_and_fail_exeception()
in APIs/1.0/base-py/ai4e_service.py
11 4 3
public static async Task ServiceBusQueueProcessorAsync()
in ProcessManager/BackendQueueProcessor/BackendQueueProcessor.cs
45 4 1
def wrap_sync_endpoint()
in APIs/1.0/base-py/ai4e_service.py
9 3 4
def wrap_async_endpoint()
in APIs/1.0/base-py/ai4e_service.py
9 3 4
def AddTask()
in APIs/1.0/base-py/task_management/api_task.py
8 3 2
def _UpdateTaskStatus()
in Containers/Common/task_management/distributed_api_task.py
20 3 4
def AddPipelineTask()
in Containers/Common/task_management/distributed_api_task.py
23 3 6
def AddTask()
in Containers/base-py/task_management/api_task.py
8 3 2
private static async Task PublishEvent()
in ProcessManager/CacheManager/CacheConnectorUpsert.cs
13 3 3
public void LogQueueLength()
in ProcessManager/Libraries/QueueLogger.cs
22 3 2
private static async Task RedisUpsert()
in ProcessManager/RequestReporter/CurrentProcessingUpsert.cs
27 3 3
def _UpdateTaskStatus()
in APIs/1.0/Common/task_management/distributed_api_task.py
9 2 4
def AddPipelineTask()
in APIs/1.0/Common/task_management/distributed_api_task.py
12 2 6