aws / aws-iot-device-sdk-cpp-v2
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 1,284 units with 11,312 lines of code in units (55.7% of code).
    • 1 very long units (102 lines of code)
    • 11 long units (704 lines of code)
    • 104 medium size units (3,552 lines of code)
    • 226 small units (3,345 lines of code)
    • 942 very small units (3,609 lines of code)
<1% | 6% | 31% | 29% | 31%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp<1% | 6% | 33% | 30% | 28%
h0% | 0% | 0% | 18% | 81%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
eventstream_rpc9% | 36% | 27% | 13% | 12%
greengrass_ipc0% | 2% | 7% | 40% | 49%
jobs0% | 7% | 77% | 10% | 5%
discovery0% | 51% | 14% | 34% | 0%
shadow0% | 0% | 69% | 19% | 10%
identity0% | 0% | 66% | 26% | 7%
secure_tunneling0% | 0% | 63% | 0% | 36%
devicedefender0% | 0% | 44% | 22% | 33%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
void ClientOperation::OnContinuationMessage()
in eventstream_rpc/source/EventStreamClient.cpp
102 21 4
bool DiscoveryClient::Discover()
in discovery/source/DiscoveryClient.cpp
91 13 2
std::future ClientConnection::Connect()
in eventstream_rpc/source/EventStreamClient.cpp
88 9 3
void CreateLocalDeploymentRequest::s_loadFromJsonView()
in greengrass_ipc/source/GreengrassCoreIpcModel.cpp
72 12 2
void ClientConnection::s_onProtocolMessage()
in eventstream_rpc/source/EventStreamClient.cpp
68 12 3
void CreateLocalDeploymentRequest::SerializeToJsonObject()
in greengrass_ipc/source/GreengrassCoreIpcModel.cpp
64 12 1
std::future ClientContinuation::SendMessage()
in eventstream_rpc/source/EventStreamClient.cpp
57 7 5
void ClientConnection::s_onConnectionSetup()
in eventstream_rpc/source/EventStreamClient.cpp
55 6 3
std::future ClientContinuation::Activate()
in eventstream_rpc/source/EventStreamClient.cpp
54 7 6
void JobExecutionData::LoadFromObject()
in jobs/source/JobExecutionData.cpp
52 12 2
std::future ClientConnection::s_sendProtocolMessage()
in eventstream_rpc/source/EventStreamClient.cpp
52 5 6
void JobExecutionData::SerializeToObject()
in jobs/source/JobExecutionData.cpp
51 12 1
std::future ClientOperation::Close()
in eventstream_rpc/source/EventStreamClient.cpp
50 5 1
49 3 4
49 3 4
49 3 4
49 3 4
49 3 4
49 3 4
49 3 4