awslabs / aws-lambda-cpp
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 151 units with 2,276 lines of code in units (56.2% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (92 lines of code)
    • 13 medium complex units (831 lines of code)
    • 12 simple units (410 lines of code)
    • 125 very simple units (943 lines of code)
0% | 4% | 36% | 18% | 41%
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
h0% | 4% | 42% | 14% | 38%
cpp0% | 0% | 10% | 35% | 53%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 4% | 37% | 18% | 40%
include/aws/http0% | 0% | 0% | 0% | 100%
include/aws/lambda-runtime0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
92 28 3
Dwarf_Die find_die()
in src/backward.h
64 22 2
ResolvedTrace resolve()
in src/backward.h
41 22 1
ResolvedTrace resolve()
in src/backward.h
70 21 1
ResolvedTrace resolve()
in src/backward.h
85 20 1
static bool die_has_pc()
in src/backward.h
56 20 3
ResolvedTrace resolve()
in src/backward.h
86 19 1
77 19 5
80 18 4
void operator()
in src/backward.h
68 16 0
51 13 4
44 12 1
void find_in_section()
in src/backward.h
59 12 5
50 12 2
static bool die_has_pc()
in src/backward.h
27 10 2
75 9 0
void run_handler()
in src/runtime.cpp
49 9 1
size_t load_here()
in src/backward.h
48 9 1
void print_trace()
in src/backward.h
30 9 3
41 8 3