microsoft / devkit-sdk
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 2,620 units with 26,643 lines of code in units (23.9% of code).
    • 1 very complex units (1,138 lines of code)
    • 4 complex units (431 lines of code)
    • 51 medium complex units (2,731 lines of code)
    • 115 simple units (3,454 lines of code)
    • 2,449 very simple units (18,889 lines of code)
4% | 1% | 10% | 12% | 70%
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
c11% | 2% | 4% | 13% | 67%
cpp0% | 2% | 20% | 17% | 60%
h0% | 0% | 6% | 4% | 88%
cs0% | 0% | 13% | 40% | 45%
js0% | 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
AZ3166/src/cores/arduino18% | 3% | 12% | 18% | 46%
AZ3166/tools/dice_device_enrollment/src0% | 13% | 16% | 25% | 45%
AZ3166/src/libraries/Sensors0% | 1% | 7% | 15% | 75%
AZ3166/src/libraries/AzureIoT0% | 0% | 51% | 14% | 34%
AZ3166/src/libraries/MQTT0% | 0% | 23% | 15% | 61%
AZ3166/src/system/mbed-os0% | 0% | 3% | 1% | 94%
AZ3166/jenkins/DevKitTestTool0% | 0% | 13% | 40% | 45%
AZ3166/src/libraries/WebSocket0% | 0% | 26% | 8% | 65%
AZ3166/src/libraries/AudioV20% | 0% | 3% | 10% | 86%
AZ3166/src/libraries/Audio0% | 0% | 3% | 9% | 87%
AZ3166/src/libraries/WiFi0% | 0% | 0% | 9% | 90%
AZ3166/src/libraries/Wire0% | 0% | 0% | 14% | 85%
AZ3166/src/system/az3166-driver0% | 0% | 0% | 45% | 54%
AZ3166/jenkins/InstallationPackageScript/src0% | 0% | 0% | 0% | 100%
AZ3166/src/libraries/FileSystem0% | 0% | 0% | 0% | 100%
AZ3166/src/libraries/SPI0% | 0% | 0% | 0% | 100%
AZ3166/src/system/azure-iot-sdk-c0% | 0% | 0% | 0% | 100%
AZ3166/jenkins/InstallationPackageScript0% | 0% | 0% | 0% | 100%
AZ3166/jenkins/deployment0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
size_t http_parser_execute()
in AZ3166/src/cores/arduino/httpclient/http_parser/http_parser.c
1138 332 4
void httpd_parse_useragent()
in AZ3166/src/cores/arduino/httpserver/http_parse.c
99 47 2
static int handle_input()
in AZ3166/src/cores/arduino/cli/console_cli.cpp
96 29 1
int LSM6DSLSensor::getEventStatus()
in AZ3166/src/libraries/Sensors/src/LSM6DSLSensor.cpp
83 28 1
int RiotStart()
in AZ3166/tools/dice_device_enrollment/src/dice_device_enrollment/RIoT/Core/RiotCore.c
153 26 5
bool __attribute__()
in AZ3166/src/libraries/AzureIoT/src/DevkitDPSClient.cpp
109 23 1
int MQTT::Client::cycle()
in AZ3166/src/libraries/MQTT/src/MQTTClient.h
72 23 1
int httpd_wsgi()
in AZ3166/src/cores/arduino/httpserver/httpd_wsgi.c
80 22 1
bool DevKitMQTTClient_Init()
in AZ3166/src/libraries/AzureIoT/src/DevKitMQTTClient.cpp
134 22 3
__STATIC_INLINE int __ap_section()
in AZ3166/src/system/mbed-os/cmsis/core_ca_mmu.h
22 22 4
__STATIC_INLINE int __ap_page()
in AZ3166/src/system/mbed-os/cmsis/core_ca_mmu.h
22 22 4
static void enable_secure_command()
in AZ3166/src/cores/arduino/cli/console_cli.cpp
61 19 2
static int parseCommandArguments()
in AZ3166/tools/dice_device_enrollment/src/dice_device_enrollment/dice_device_enrollment.cpp
76 18 2
int httpd_send_response_301()
in AZ3166/src/cores/arduino/httpserver/httpd_wsgi.c
68 17 5
public static int Main()
in AZ3166/jenkins/DevKitTestTool/Program.cs
89 16 1
int LSM6DSLSensor::enableDoubleTapDetection()
in AZ3166/src/libraries/Sensors/src/LSM6DSLSensor.cpp
65 16 1
int httpd_send_default_headers()
in AZ3166/src/cores/arduino/httpserver/httpd_wsgi.c
47 15 2
int httpd_send_response()
in AZ3166/src/cores/arduino/httpserver/httpd_wsgi.c
61 15 5
int IoTHubClient_FwVersionCompare()
in AZ3166/src/libraries/AzureIoT/src/DevKitOTAUtils.cpp
31 15 2
int initIoTDevKit()
in AZ3166/src/libraries/Sensors/src/IoT_DevKit_HW.cpp
83 15 1