microsoft / RIoT
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 771 units with 18,932 lines of code in units (51.0% of code).
    • 2 very complex units (630 lines of code)
    • 8 complex units (826 lines of code)
    • 74 medium complex units (4,544 lines of code)
    • 119 simple units (4,312 lines of code)
    • 568 very simple units (8,620 lines of code)
3% | 4% | 24% | 22% | 45%
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
c4% | 5% | 25% | 23% | 41%
cs0% | 0% | 13% | 21% | 65%
cpp0% | 0% | 67% | 5% | 26%
java0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Simulation/RIoT4% | 5% | 25% | 23% | 41%
Reference/RIoT4% | 5% | 25% | 23% | 41%
Tools/RIoT0% | 0% | 13% | 18% | 68%
Tools/TlsClient0% | 0% | 74% | 8% | 16%
Tools/RIoTDemo0% | 0% | 23% | 24% | 51%
Simulation/DICE0% | 0% | 33% | 29% | 36%
Tools/DICETest0% | 0% | 12% | 39% | 47%
Pkgs/NuGet0% | 0% | 0% | 0% | 100%
Pkgs/Maven0% | 0% | 0% | 0% | 100%
Reference0% | 0% | 0% | 0% | 100%
Simulation/FW0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
int mbedtls_aes_self_test()
in Reference/RIoT/RIoTCrypt/aes.c
315 73 1
int mbedtls_aes_self_test()
in Simulation/RIoT/Core/RIoTCrypt/aes.c
315 73 1
int mbedtls_mpi_exp_mod()
in Reference/RIoT/RIoTCrypt/bignum.c
129 33 5
int mbedtls_mpi_exp_mod()
in Simulation/RIoT/Core/RIoTCrypt/bignum.c
129 33 5
int mbedtls_mpi_gen_prime()
in Reference/RIoT/RIoTCrypt/bignum.c
76 30 4
int mbedtls_mpi_gen_prime()
in Simulation/RIoT/Core/RIoTCrypt/bignum.c
76 30 4
static int ecp_precompute_comb()
in Reference/RIoT/RIoTCrypt/ecp.c
91 28 6
static int ecp_precompute_comb()
in Simulation/RIoT/Core/RIoTCrypt/ecp.c
91 28 6
int mbedtls_mpi_self_test()
in Reference/RIoT/RIoTCrypt/bignum.c
117 26 1
int mbedtls_mpi_self_test()
in Simulation/RIoT/Core/RIoTCrypt/bignum.c
117 26 1
static void Main()
in Tools/RIoT/Main.cs
143 21 1
static int ecp_mul_comb()
in Reference/RIoT/RIoTCrypt/ecp.c
85 20 5
static int ecp_mul_comb()
in Simulation/RIoT/Core/RIoTCrypt/ecp.c
85 20 5
private async void Timer1_Tick()
in Tools/RIoTDemo/MainPage.cs
92 20 2
int mbedtls_aes_crypt_xts()
in Reference/RIoT/RIoTCrypt/aes.c
66 18 6
static int ecdsa_sign_restartable()
in Reference/RIoT/RIoTCrypt/ecdsa.c
90 18 7
int mbedtls_ecp_self_test()
in Reference/RIoT/RIoTCrypt/ecp.c
97 18 1
int mbedtls_aes_crypt_xts()
in Simulation/RIoT/Core/RIoTCrypt/aes.c
66 18 6
static int ecdsa_sign_restartable()
in Simulation/RIoT/Core/RIoTCrypt/ecdsa.c
90 18 7
int mbedtls_ecp_self_test()
in Simulation/RIoT/Core/RIoTCrypt/ecp.c
97 18 1