microsoft / AIforEarth-API-Platform
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 81 units with 982 lines of code in units (38.7% of code).
    • 1 very long units (146 lines of code)
    • 1 long units (53 lines of code)
    • 11 medium size units (381 lines of code)
    • 12 small units (164 lines of code)
    • 56 very small units (238 lines of code)
14% | 5% | 38% | 16% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs22% | 8% | 51% | 9% | 8%
py0% | 0% | 14% | 30% | 55%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ProcessManager/CacheManager55% | 0% | 36% | 4% | 3%
ProcessManager/RequestReporter0% | 41% | 58% | 0% | 0%
ProcessManager/BackendQueueProcessor0% | 0% | 100% | 0% | 0%
ProcessManager/BackendWebhook0% | 0% | 94% | 0% | 5%
APIs/1.00% | 0% | 11% | 38% | 49%
Containers/Common0% | 0% | 35% | 31% | 32%
ProcessManager/Libraries0% | 0% | 22% | 50% | 27%
Containers/base-py0% | 0% | 0% | 0% | 100%
APIManagement0% | 0% | 0% | 0% | 100%
ProcessManager/TaskProcessLogger0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest 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/CurrentProcessingUpsert.cs
53 6 3
public static async Task Run()
in ProcessManager/BackendWebhook/BackendWebhook.cs
48 6 3
private static async Task UpdateTaskStatus()
in ProcessManager/BackendQueueProcessor/BackendQueueProcessor.cs
47 5 6
public static async Task Run()
in ProcessManager/RequestReporter/CurrentProcessingGet.cs
47 7 3
public static async Task ServiceBusQueueProcessorAsync()
in ProcessManager/BackendQueueProcessor/BackendQueueProcessor.cs
45 4 1
public static async Task Run()
in ProcessManager/CacheManager/CacheConnectorGet.cs
43 6 3
private static async Task PublishServiceBusQueueEvent()
in ProcessManager/CacheManager/CacheConnectorUpsert.cs
29 2 3
private static async Task RedisUpsert()
in ProcessManager/RequestReporter/CurrentProcessingUpsert.cs
27 3 3
def api_func()
in APIs/1.0/base-py/ai4e_service.py
25 4 11
private static async Task PublishEventGridEvent()
in ProcessManager/CacheManager/CacheConnectorUpsert.cs
25 2 5
def AddPipelineTask()
in Containers/Common/task_management/distributed_api_task.py
23 3 6
public void LogQueueLength()
in ProcessManager/Libraries/QueueLogger.cs
22 3 2
def _UpdateTaskStatus()
in Containers/Common/task_management/distributed_api_task.py
20 3 4
def __init__()
in APIs/1.0/base-py/ai4e_service.py
19 2 3
def _execute_func_with_counter()
in APIs/1.0/base-py/ai4e_service.py
16 2 4
def before_request()
in APIs/1.0/base-py/ai4e_service.py
14 1 1
private static async Task PublishEvent()
in ProcessManager/CacheManager/CacheConnectorUpsert.cs
13 3 3
def AddPipelineTask()
in APIs/1.0/Common/task_management/distributed_api_task.py
12 2 6
public void LogInformation()
in ProcessManager/Libraries/AppInsightsLogger.cs
12 2 3