microsoft / Ros-Orchestration
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 207 units with 1,953 lines of code in units (48.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 1 simple units (9 lines of code)
    • 206 very simple units (1,944 lines of code)
0% | 0% | 0% | <1% | 99%
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
py0% | 0% | 0% | 4% | 95%
cs0% | 0% | 0% | 0% | 100%
tsx0% | 0% | 0% | 0% | 100%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Robot/src0% | 0% | 0% | 4% | 95%
ui/src0% | 0% | 0% | 0% | 100%
RobotOrchestrator.OrderManager0% | 0% | 0% | 0% | 100%
RobotOrchestrator.OrderProducer0% | 0% | 0% | 0% | 100%
RobotOrchestrator.FleetManager0% | 0% | 0% | 0% | 100%
RobotOrchestrator0% | 0% | 0% | 0% | 100%
RobotOrchestrator.Dispatcher0% | 0% | 0% | 0% | 100%
RobotOrchestrator.FleetManager/Controllers0% | 0% | 0% | 0% | 100%
RobotOrchestrator.OrderProducer/Controllers0% | 0% | 0% | 0% | 100%
RobotOrchestrator.Dispatcher/Controllers0% | 0% | 0% | 0% | 100%
RobotOrchestrator.OrderManager/Controllers0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def done_callback()
in Robot/src/orchestrated_robot/scripts/move_base_client.py
9 6 3
private Order UpdateOrderStatus()
in RobotOrchestrator.OrderManager/JobMessageHandler.cs
21 5 2
private async Task ProcessBatches()
in RobotOrchestrator.OrderProducer/BatchJob.cs
15 5 2
public void Validate()
in RobotOrchestrator.OrderProducer/BatchJobOptions.cs
7 5 0
private getRobotColor()
in ui/src/Map.tsx
17 5 1
export default function register()
in ui/src/registerServiceWorker.ts
25 5 0
def handle_job_new()
in Robot/src/orchestrated_robot/scripts/robot_controller.py
18 4 2
function registerValidSW()
in ui/src/registerServiceWorker.ts
23 4 1
def execute_job()
in Robot/src/orchestrated_robot/scripts/robot_controller.py
18 3 2
public async Task PostJobAsync()
in RobotOrchestrator.Dispatcher/Controllers/JobsController.cs
19 3 1
public async Task InsertTelemetriesAndUpdateRobotsAsync()
in RobotOrchestrator.FleetManager/FleetManager.cs
20 3 1
public async Task ProcessEventsAsync()
in RobotOrchestrator.FleetManager/TelemetryEventProcessor.cs
16 3 2
public async Task InsertTelemetryAsync()
in RobotOrchestrator.FleetManager/TelemetryHandler.cs
14 3 1
public async Task ProcessEventsAsync()
in RobotOrchestrator.OrderManager/JobEventProcessor.cs
16 3 2
private IEnumerable AssignOrdersToRobots()
in RobotOrchestrator.OrderManager/OrderManager.cs
19 3 2
private void stopBatchJob()
in RobotOrchestrator.OrderProducer/BatchJob.cs
16 3 0
public void StartBatchJob()
in RobotOrchestrator.OrderProducer/BatchManager.cs
15 3 2
public void HandleBatch()
in RobotOrchestrator.OrderProducer/OrderHandler.cs
16 3 1
public async Task UpsertItemAsync()
in RobotOrchestrator/CosmosDbClient.cs
17 3 2
public async Task GetItemAsync()
in RobotOrchestrator/CosmosDbClient.cs
24 3 2