aws-robotics / utils-common
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 32 units with 456 lines of code in units (47.9% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (65 lines of code)
    • 5 medium size units (188 lines of code)
    • 9 small units (110 lines of code)
    • 17 very small units (93 lines of code)
0% | 14% | 41% | 24% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp0% | 15% | 37% | 26% | 20%
h0% | 0% | 82% | 0% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
aws_common/src/sdk_utils/auth0% | 27% | 35% | 16% | 20%
aws_common/src/sdk_utils0% | 0% | 41% | 39% | 19%
aws_common/src/sdk_utils/logging0% | 0% | 48% | 24% | 27%
aws_common/include/aws_common/sdk_utils0% | 0% | 82% | 0% | 17%
aws_common/src/fs_utils0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
void IotRoleCredentialsProvider::Refresh()
in aws_common/src/sdk_utils/auth/service_credentials_provider.cpp
65 26 0
ClientConfiguration ClientConfigurationProvider::GetClientConfiguration()
in aws_common/src/sdk_utils/client_configuration_provider.cpp
47 9 1
bool GetServiceAuthConfig()
in aws_common/src/sdk_utils/auth/service_credentials_provider.cpp
47 11 2
bool IotRoleCredentialsProvider::ValidateResponse()
in aws_common/src/sdk_utils/auth/service_credentials_provider.cpp
38 8 1
void AWSLogSystem::LogMessage()
in aws_common/src/sdk_utils/logging/aws_log_system.cpp
28 8 3
T MakeCall()
in aws_common/include/aws_common/sdk_utils/throttling_manager.h
28 4 4
static bool GetConfigValue()
in aws_common/src/sdk_utils/auth/service_credentials_provider.cpp
14 5 4
void AWSLogSystem::Log()
in aws_common/src/sdk_utils/logging/aws_log_system.cpp
14 2 4
static size_t WriteData()
in aws_common/src/sdk_utils/auth/service_credentials_provider.cpp
13 2 4
int wordexp_ros()
in aws_common/src/fs_utils/wordexp_ros.cpp
12 4 3
static bool AppendHeader()
in aws_common/src/sdk_utils/auth/service_credentials_provider.cpp
12 2 3
const Profile AWSProfileProvider::GetProfile()
in aws_common/src/sdk_utils/aws_profile_provider.cpp
12 3 0
std::string ParameterPath::get_node_path()
in aws_common/src/sdk_utils/parameter_path.cpp
11 4 1
std::string ParameterPath::get_local_path()
in aws_common/src/sdk_utils/parameter_path.cpp
11 4 1
void ClientConfigurationProvider::PopulateUserAgent()
in aws_common/src/sdk_utils/client_configuration_provider.cpp
11 2 2
std::string ParameterPath::get_resolved_path()
in aws_common/src/sdk_utils/parameter_path.cpp
10 2 2
static bool SetCurlOpt()
in aws_common/src/sdk_utils/auth/service_credentials_provider.cpp
9 2 3
static bool ParseConfigValue()
in aws_common/src/sdk_utils/auth/service_credentials_provider.cpp
9 2 2
AWSCredentials IotRoleCredentialsProvider::GetAWSCredentials()
in aws_common/src/sdk_utils/auth/service_credentials_provider.cpp
8 2 0
void AWSLogSystem::LogStream()
in aws_common/src/sdk_utils/logging/aws_log_system.cpp
8 2 3