awslabs / aws-c-s3
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 144 units with 4,324 lines of code in units (61.7% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (146 lines of code)
    • 12 medium complex units (1,200 lines of code)
    • 18 simple units (1,076 lines of code)
    • 113 very simple units (1,902 lines of code)
0% | 3% | 27% | 24% | 43%
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% | 3% | 30% | 19% | 46%
ts0% | 0% | 0% | 98% | 1%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source0% | 3% | 30% | 19% | 46%
benchmarks/dashboard-stack/lib0% | 0% | 0% | 97% | 2%
benchmarks/benchmarks-stack/benchmarks-stack/lib0% | 0% | 0% | 100% | 0%
benchmarks/dashboard-stack/lambda0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
static bool s_s3_copy_object_update()
in source/s3_copy_object.c
146 27 3
154 24 3
static bool s_s3_auto_ranged_get_update()
in source/s3_auto_ranged_get.c
121 23 3
static bool s_s3_auto_ranged_put_update()
in source/s3_auto_ranged_put.c
110 22 3
148 22 3
67 22 3
80 21 5
133 15 2
107 14 4
static bool s_s3_meta_request_default_update()
in source/s3_default_meta_request.c
63 12 3
95 12 2
92 12 3
static bool s_on_contents_node()
in source/s3_list_objects.c
30 11 3
92 10 7
129 10 1
58 9 1
60 9 4
constructor()
in benchmarks/dashboard-stack/lib/dashboard-stack.ts
181 9 3
52 8 3
60 7 3