aws-samples / aws-iot-fleet-provisioning
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 50 units with 502 lines of code in units (70.4% 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)
    • 0 simple units (0 lines of code)
    • 50 very simple units (502 lines of code)
0% | 0% | 0% | 0% | 100%
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% | 0% | 0% | 100%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 0% | 0% | 100%
dotnet-core/AWS.IoT.FleetProvisioning/Provisioning0% | 0% | 0% | 0% | 100%
dotnet-core/AWS.IoT.FleetProvisioning/IoTClient0% | 0% | 0% | 0% | 100%
dotnet-core/AWS.IoT.FleetProvisioning0% | 0% | 0% | 0% | 100%
dotnet-core/AWS.IoT.FleetProvisioning/Certificates0% | 0% | 0% | 0% | 100%
dotnet-core/AWS.IoT.FleetProvisioning/Extensions0% | 0% | 0% | 0% | 100%
utils0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def on_message_callback()
in provisioning_handler.py
19 5 2
def __init__()
in provisioning_handler.py
18 4 2
def basic_callback()
in provisioning_handler.py
11 4 4
10 4 1
def get_current_certs()
in provisioning_handler.py
7 3 1
def enable_error_monitor()
in provisioning_handler.py
14 3 1
private void MessageCallback()
in dotnet-core/AWS.IoT.FleetProvisioning/Provisioning/DeviceProvisioningHandler.cs
18 3 1
public X509Certificate2 LoadX509Certificate()
in dotnet-core/AWS.IoT.FleetProvisioning/Certificates/CertificateLoader.cs
26 3 3
public static async Task Main()
in dotnet-core/AWS.IoT.FleetProvisioning/Program.cs
24 3 1
def core_connect()
in provisioning_handler.py
26 2 1
def get_official_certs()
in provisioning_handler.py
5 2 3
def register_thing()
in provisioning_handler.py
13 2 3
def new_cert_pub_sub()
in provisioning_handler.py
13 2 1
public async Task BeginProvisioningFlowAsync()
in dotnet-core/AWS.IoT.FleetProvisioning/Provisioning/DeviceProvisioningHandler.cs
16 2 1
public static string ToJson()
in dotnet-core/AWS.IoT.FleetProvisioning/Extensions/JsonExtensions.cs
6 2 3
public static T FromJson()
in dotnet-core/AWS.IoT.FleetProvisioning/Extensions/JsonExtensions.cs
7 2 2
private void ClientOnMqttMsgPublishReceived()
in dotnet-core/AWS.IoT.FleetProvisioning/IoTClient/ProvisioningClient.cs
11 2 2
def on_connection_interrupted()
in provisioning_handler.py
2 1 4
def on_connection_resumed()
in provisioning_handler.py
2 1 5
def assemble_certificates()
in provisioning_handler.py
13 1 2