freertos / coreMQTT-Agent-Demos
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 391 units with 7,018 lines of code in units (52.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 11 medium complex units (1,045 lines of code)
    • 27 simple units (1,300 lines of code)
    • 353 very simple units (4,673 lines of code)
0% | 0% | 14% | 18% | 66%
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
c0% | 0% | 19% | 22% | 58%
py0% | 0% | 0% | 10% | 89%
h0% | 0% | 0% | 1% | 98%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/FreeRTOS/network_transport0% | 0% | 36% | 25% | 38%
source/defender-tools0% | 0% | 37% | 45% | 17%
source/demo-tasks0% | 0% | 7% | 16% | 75%
source0% | 0% | 16% | 0% | 83%
build/VisualStudio/target-specific-source0% | 0% | 37% | 20% | 41%
source/subscription-manager0% | 0% | 45% | 54% | 0%
lib/AWS/ota-pal0% | 0% | 0% | 48% | 51%
build/Cortex-M3_MPS2_QEMU_GCC/target-specific-source0% | 0% | 0% | 4% | 95%
lib/FreeRTOS/utilities0% | 0% | 0% | 16% | 83%
lib/AWS/tools0% | 0% | 0% | 9% | 90%
lib/FreeRTOS/mqtt-agent-interface0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
eReportBuilderStatus eGenerateJsonReport()
in source/defender-tools/report_builder.c
220 24 7
static TlsTransportStatus_t tlsSetup()
in lib/FreeRTOS/network_transport/freertos_plus_tcp/using_mbedtls_pkcs11/using_mbedtls_pkcs11.c
167 23 3
static CK_RV initializeClientKeys()
in lib/FreeRTOS/network_transport/freertos_plus_tcp/using_mbedtls_pkcs11/using_mbedtls_pkcs11.c
81 14 1
TlsTransportStatus_t TLS_FreeRTOS_Connect()
in lib/FreeRTOS/network_transport/freertos_plus_tcp/using_mbedtls/using_mbedtls.c
75 13 6
void vTCPLoggingPrintf()
in build/VisualStudio/target-specific-source/logging_output_windows.c
75 12 2
TlsTransportStatus_t TLS_FreeRTOS_Connect()
in lib/FreeRTOS/network_transport/freertos_plus_tcp/using_mbedtls_pkcs11/using_mbedtls_pkcs11.c
67 12 6
static bool prvCollectDeviceMetrics()
in source/demo-tasks/defender_demo.c
84 12 1
bool addSubscription()
in source/subscription-manager/subscription_manager.c
53 12 5
static int32_t privateKeySigningCallback()
in lib/FreeRTOS/network_transport/freertos_plus_tcp/using_mbedtls_pkcs11/using_mbedtls_pkcs11.c
72 11 7
void prvDefenderDemoTask()
in source/demo-tasks/defender_demo.c
61 11 1
static BaseType_t prvSocketConnect()
in source/mqtt-agent-task.c
90 11 1
static eReportBuilderStatus prvWritePortsArray()
in source/defender-tools/report_builder.c
80 9 5
static eReportBuilderStatus prvWriteConnectionsArray()
in source/defender-tools/report_builder.c
73 9 5
static eReportBuilderStatus prvWriteTaskIdsArray()
in source/defender-tools/report_builder.c
64 9 5
void vTCPLoggingPrintf()
in build/Cortex-M3_MPS2_QEMU_GCC/target-specific-source/logging_output_qemu.c
47 8 2
BaseType_t Sockets_Connect()
in lib/FreeRTOS/network_transport/freertos_plus_tcp/sockets_wrapper.c
72 8 5
static CK_RV readCertificateIntoContext()
in lib/FreeRTOS/network_transport/freertos_plus_tcp/using_mbedtls_pkcs11/using_mbedtls_pkcs11.c
50 8 4
65 8 1
OtaPalImageState_t otaPal_GetPlatformImageState()
in lib/AWS/ota-pal/Win32/ota_pal.c
43 8 1
static void prvOTADemoTask()
in source/demo-tasks/ota_over_mqtt_demo.c
64 8 1