awslabs / aws-c-auth
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 256 units with 5,638 lines of code in units (59.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (96 lines of code)
    • 23 medium complex units (1,461 lines of code)
    • 37 simple units (1,361 lines of code)
    • 195 very simple units (2,720 lines of code)
0% | 1% | 25% | 24% | 48%
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% | 1% | 25% | 24% | 48%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source0% | 1% | 25% | 24% | 48%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
static int s_parse_instance_info()
in source/aws_imds_client.c
96 33 2
113 24 1
static void s_on_stream_complete_fn()
in source/credentials_provider_sts.c
95 21 3
61 20 3
77 19 2
static bool s_on_creds_node_encountered_fn()
in source/credentials_provider_sts_web_identity.c
52 18 3
61 17 1
68 17 1
83 16 3
77 15 2
static bool s_on_node_encountered_fn()
in source/credentials_provider_sts.c
43 15 3
static int s_make_sts_web_identity_http_query()
in source/credentials_provider_sts_web_identity.c
75 14 2
static int s_construct_endpoint()
in source/credentials_provider_sts_web_identity.c
35 14 4
51 14 3
int aws_verify_sigv4a_signing()
in source/aws_signing.c
84 14 7
static void s_start_make_request()
in source/credentials_provider_sts.c
80 14 2
43 13 1
static int s_parse_iam_profile()
in source/aws_imds_client.c
35 12 2
static int s_make_ecs_http_query()
in source/credentials_provider_ecs.c
77 12 2
static int s_make_imds_http_query()
in source/aws_imds_client.c
67 11 5