awslabs / aws-c-cal
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 132 units with 1,687 lines of code in units (45.5% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (71 lines of code)
    • 4 medium complex units (201 lines of code)
    • 11 simple units (342 lines of code)
    • 116 very simple units (1,073 lines of code)
0% | 4% | 11% | 20% | 63%
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% | 4% | 11% | 20% | 63%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source0% | 11% | 22% | 0% | 66%
source/windows0% | 0% | 20% | 0% | 79%
source/unix0% | 0% | 0% | 58% | 41%
source/darwin0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
71 31 2
67 19 5
static int s_verify_signature()
in source/windows/bcrypt_ecc.c
57 14 3
41 11 2
int s_parse_cursor()
in source/der.c
36 11 2
bool s_resolve_hmac_lc()
in source/unix/openssl_platform_init.c
39 10 1
bool s_resolve_md_lc()
in source/unix/openssl_platform_init.c
35 10 1
57 10 1
bool s_resolve_hmac_111()
in source/unix/openssl_platform_init.c
37 9 1
bool s_resolve_hmac_102()
in source/unix/openssl_platform_init.c
35 8 1
13 8 2
bool s_resolve_md_102()
in source/unix/openssl_platform_init.c
32 8 1
bool s_resolve_md_111()
in source/unix/openssl_platform_init.c
32 8 1
13 8 2
static enum aws_libcrypto_version s_resolve_libcrypto()
in source/unix/openssl_platform_init.c
26 6 1
void aws_cal_platform_init()
in source/unix/openssl_platform_init.c
23 6 1
static int s_sign_message()
in source/darwin/securityframework_ecc.c
28 5 3
static int s_verify_signature()
in source/darwin/securityframework_ecc.c
20 5 3
static void s_destroy_key()
in source/darwin/securityframework_ecc.c
16 5 1
void aws_cal_platform_clean_up()
in source/unix/openssl_platform_init.c
19 5 1