awslabs / aws-c-sdkutils
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 40 units with 687 lines of code in units (54.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (227 lines of code)
    • 10 simple units (308 lines of code)
    • 26 very simple units (152 lines of code)
0% | 0% | 33% | 44% | 22%
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% | 33% | 44% | 22%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source0% | 0% | 33% | 44% | 22%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
53 14 5
71 12 2
61 11 2
42 11 2
49 10 2
int aws_resource_name_init_from_cur()
in source/resource_name.c
29 10 2
static bool s_is_identifier()
in source/aws_profile.c
9 9 1
25 9 2
static int s_profile_merge()
in source/aws_profile.c
28 7 2
28 7 2
static bool s_parse_property()
in source/aws_profile.c
51 7 2
24 6 4
31 6 2
34 6 4
static bool s_is_whitespace()
in source/aws_profile.c
12 5 1
static bool s_parse_by_token()
in source/aws_profile.c
17 5 3
16 5 1
static void s_log_parse_context()
in source/aws_profile.c
10 4 2
static bool s_is_comment_token()
in source/aws_profile.c
4 2 1
static bool s_is_comment_line()
in source/aws_profile.c
4 2 1