aws-samples / aws-iot-securetunneling-localproxy
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 98 units with 2,484 lines of code in units (73.0% of code).
    • 1 very complex units (203 lines of code)
    • 0 complex units (0 lines of code)
    • 6 medium complex units (498 lines of code)
    • 15 simple units (611 lines of code)
    • 76 very simple units (1,172 lines of code)
8% | 0% | 20% | 24% | 47%
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
cpp8% | 0% | 20% | 24% | 47%
h0% | 0% | 0% | 57% | 42%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src8% | 0% | 20% | 21% | 48%
src/config0% | 0% | 0% | 84% | 15%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
bool process_cli()
in src/main.cpp
203 52 5
108 20 2
156 17 1
58 14 2
69 14 2
54 13 2
53 11 1
void update_port_mapping()
in src/config/ConfigFile.cpp
39 10 2
72 10 2
60 9 0
virtual std::string message()
in src/WebProxyAdapter.h
24 9 1
88 9 3
28 9 1
bool is_valid_directory()
in src/config/ConfigFile.cpp
22 8 1
68 8 2
void read_service_ids_from_config_files()
in src/config/ConfigFile.cpp
32 7 3
24 7 2
29 6 1
31 6 1
39 6 2