awslabs / aws-crt-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 457 units with 3,512 lines of code in units (39.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (136 lines of code)
    • 12 simple units (412 lines of code)
    • 443 very simple units (2,964 lines of code)
0% | 0% | 3% | 11% | 84%
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
cpp0% | 0% | 4% | 10% | 85%
h0% | 0% | 0% | 20% | 79%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/http0% | 0% | 14% | 7% | 77%
source/iot0% | 0% | 60% | 35% | 3%
source/mqtt0% | 0% | 0% | 28% | 71%
include/aws0% | 0% | 0% | 20% | 79%
source/io0% | 0% | 0% | 12% | 87%
source0% | 0% | 0% | 0% | 100%
source/auth0% | 0% | 0% | 0% | 100%
source/crypto0% | 0% | 0% | 0% | 100%
codebuild0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
67 14 0
bool HttpClientConnection::CreateConnection()
in source/http/HttpConnection.cpp
69 11 2
39 9 1
bool MqttConnection::Connect()
in source/mqtt/MqttClient.cpp
52 8 5
uint16_t MqttConnection::Subscribe()
in source/mqtt/MqttClient.cpp
62 8 3
34 8 0
35 7 2
size_type find_first_not_of()
in include/aws/crt/StringView.h
20 7 3
uint16_t MqttConnection::Subscribe()
in source/mqtt/MqttClient.cpp
43 6 4
37 6 3
size_type find()
in include/aws/crt/StringView.h
21 6 3
size_type rfind()
in include/aws/crt/StringView.h
22 6 3
size_type find_last_of()
in include/aws/crt/StringView.h
24 6 3
size_type find_last_not_of()
in include/aws/crt/StringView.h
23 6 3
bool Sigv4HttpRequestSigner::SignRequest()
in source/auth/Sigv4Signing.cpp
33 5 3
uint16_t MqttConnection::Publish()
in source/mqtt/MqttClient.cpp
41 5 5
12 5 1
25 5 2
size_type rfind()
in include/aws/crt/StringView.h
23 5 2
size_type find_first_of()
in include/aws/crt/StringView.h
13 5 3