aws / aws-iot-device-sdk-cpp-v2
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 1,284 units with 11,312 lines of code in units (55.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 10 medium complex units (613 lines of code)
    • 37 simple units (1,236 lines of code)
    • 1,237 very simple units (9,463 lines of code)
0% | 0% | 5% | 10% | 83%
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% | 5% | 11% | 82%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
eventstream_rpc0% | 0% | 24% | 34% | 41%
greengrass_ipc0% | 0% | 2% | 5% | 92%
jobs0% | 0% | 7% | 24% | 68%
discovery0% | 0% | 51% | 14% | 34%
shadow0% | 0% | 0% | 6% | 93%
secure_tunneling0% | 0% | 0% | 29% | 70%
devicedefender0% | 0% | 0% | 44% | 55%
identity0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void ClientOperation::OnContinuationMessage()
in eventstream_rpc/source/EventStreamClient.cpp
102 21 4
Crt::String RpcError::StatusToString()
in eventstream_rpc/source/EventStreamClient.cpp
35 14 0
bool SubscribeToTopicStreamHandler::OnStreamError()
in greengrass_ipc/source/GreengrassCoreIpcModel.cpp
31 13 2
bool DiscoveryClient::Discover()
in discovery/source/DiscoveryClient.cpp
91 13 2
void CreateLocalDeploymentRequest::SerializeToJsonObject()
in greengrass_ipc/source/GreengrassCoreIpcModel.cpp
64 12 1
void CreateLocalDeploymentRequest::s_loadFromJsonView()
in greengrass_ipc/source/GreengrassCoreIpcModel.cpp
72 12 2
void JobExecutionData::LoadFromObject()
in jobs/source/JobExecutionData.cpp
52 12 2
void JobExecutionData::SerializeToObject()
in jobs/source/JobExecutionData.cpp
51 12 1
void ClientConnection::s_onProtocolMessage()
in eventstream_rpc/source/EventStreamClient.cpp
68 12 3
EventStreamRpcStatusCode ClientOperation::HandleError()
in eventstream_rpc/source/EventStreamClient.cpp
47 11 3
Aws::Crt::Optional ComponentDetails::GetState()
in greengrass_ipc/source/GreengrassCoreIpcModel.cpp
38 10 0
bool SubscribeToIoTCoreStreamHandler::OnStreamError()
in greengrass_ipc/source/GreengrassCoreIpcModel.cpp
25 10 2
bool SubscribeToConfigurationUpdateStreamHandler::OnStreamError()
in greengrass_ipc/source/GreengrassCoreIpcModel.cpp
25 10 2
bool SubscribeToComponentUpdatesStreamHandler::OnStreamError()
in greengrass_ipc/source/GreengrassCoreIpcModel.cpp
25 10 2
void UpdateJobExecutionRequest::LoadFromObject()
in jobs/source/UpdateJobExecutionRequest.cpp
44 10 2
void UpdateJobExecutionRequest::SerializeToObject()
in jobs/source/UpdateJobExecutionRequest.cpp
43 10 1
RejectedErrorCode FromString()
in jobs/source/RejectedErrorCode.cpp
42 10 1
void ComponentDetails::SetState()
in greengrass_ipc/source/GreengrassCoreIpcModel.cpp
32 9 1
JobStatus FromString()
in jobs/source/JobStatus.cpp
38 9 1
std::future ClientConnection::Connect()
in eventstream_rpc/source/EventStreamClient.cpp
88 9 3