microsoft / Ros-Orchestration
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 207 units with 1,953 lines of code in units (48.2% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 13 medium size units (319 lines of code)
    • 64 small units (960 lines of code)
    • 130 very small units (674 lines of code)
0% | 0% | 16% | 49% | 34%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 0% | 10% | 57% | 32%
tsx0% | 0% | 31% | 30% | 38%
ts0% | 0% | 90% | 0% | 9%
py0% | 0% | 0% | 48% | 51%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ui/src0% | 0% | 41% | 25% | 33%
RobotOrchestrator.OrderManager0% | 0% | 20% | 45% | 34%
RobotOrchestrator0% | 0% | 11% | 59% | 29%
RobotOrchestrator.OrderProducer0% | 0% | 7% | 64% | 27%
RobotOrchestrator.FleetManager0% | 0% | 7% | 53% | 38%
Robot/src0% | 0% | 0% | 48% | 51%
RobotOrchestrator.FleetManager/Controllers0% | 0% | 0% | 86% | 13%
RobotOrchestrator.Dispatcher0% | 0% | 0% | 70% | 29%
RobotOrchestrator.OrderProducer/Controllers0% | 0% | 0% | 51% | 48%
RobotOrchestrator.Dispatcher/Controllers0% | 0% | 0% | 79% | 20%
RobotOrchestrator.OrderManager/Controllers0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public drawRobotsOnMap()
in ui/src/Map.tsx
44 1 4
private async Task DispatchOrderAssignmentAsync()
in RobotOrchestrator.OrderManager/OrderManager.cs
25 2 1
export default function register()
in ui/src/registerServiceWorker.ts
25 5 0
public async Task GetItemAsync()
in RobotOrchestrator/CosmosDbClient.cs
24 3 2
public drawLegend()
in ui/src/Map.tsx
24 1 2
public drawCursorText()
in ui/src/Map.tsx
24 1 3
public void ConfigureServices()
in RobotOrchestrator.OrderManager/Startup.cs
23 1 1
function registerValidSW()
in ui/src/registerServiceWorker.ts
23 4 1
public drawMap()
in ui/src/Map.tsx
22 1 5
function checkValidServiceWorker()
in ui/src/registerServiceWorker.ts
22 3 1
public void ConfigureServices()
in RobotOrchestrator.FleetManager/Startup.cs
21 1 1
private Order UpdateOrderStatus()
in RobotOrchestrator.OrderManager/JobMessageHandler.cs
21 5 2
public void StopBatchJob()
in RobotOrchestrator.OrderProducer/BatchManager.cs
21 2 0
public async Task InsertTelemetriesAndUpdateRobotsAsync()
in RobotOrchestrator.FleetManager/FleetManager.cs
20 3 1
private void ConfigureEventProcessorHostServices()
in RobotOrchestrator.FleetManager/Startup.cs
20 1 1
private void ConfigureEventProcessorHostServices()
in RobotOrchestrator.OrderManager/Startup.cs
20 1 1
def publish_latest_telemetry()
in Robot/src/orchestrated_robot/scripts/telemetry_controller.py
19 2 2
public async Task PostJobAsync()
in RobotOrchestrator.Dispatcher/Controllers/JobsController.cs
19 3 1
private IEnumerable AssignOrdersToRobots()
in RobotOrchestrator.OrderManager/OrderManager.cs
19 3 2
def handle_job_new()
in Robot/src/orchestrated_robot/scripts/robot_controller.py
18 4 2