aws-robotics / cloudwatch-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 216 units with 2,219 lines of code in units (54.5% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (104 lines of code)
    • 28 medium size units (902 lines of code)
    • 30 small units (419 lines of code)
    • 156 very small units (794 lines of code)
0% | 4% | 40% | 18% | 35%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp0% | 7% | 58% | 16% | 16%
h0% | 0% | 14% | 22% | 63%
hpp0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
cloudwatch_logs_common/src0% | 17% | 66% | 7% | 8%
cloudwatch_metrics_common/src0% | 0% | 80% | 8% | 10%
file_management/src0% | 0% | 36% | 39% | 24%
file_management/include0% | 0% | 29% | 24% | 46%
cloudwatch_metrics_common/include0% | 0% | 76% | 0% | 23%
dataflow_lite/include0% | 0% | 3% | 23% | 72%
dataflow_lite/src0% | 0% | 0% | 0% | 100%
cloudwatch_logs_common/include0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
Aws::CloudWatchLogs::ROSCloudWatchLogsErrors CloudWatchLogsFacade::SendLogsToCloudWatch()
in cloudwatch_logs_common/src/utils/cloudwatch_logs_facade.cpp
53 8 4
FileObject LogFileManager::readBatch()
in cloudwatch_logs_common/src/utils/log_file_manager.cpp
51 8 1
bool LogBatcher::publishBatchedData()
in cloudwatch_logs_common/src/log_batcher.cpp
48 10 0
Aws::CloudWatchLogs::ROSCloudWatchLogsErrors CloudWatchLogsFacade::CheckLogStreamExists()
in cloudwatch_logs_common/src/utils/cloudwatch_logs_facade.cpp
48 10 3
bool MetricBatcher::publishBatchedData()
in cloudwatch_metrics_common/src/metric_batcher.cpp
48 10 0
inline void work()
in file_management/include/file_management/file_upload/file_upload_streamer.h
43 6 0
Aws::CloudWatchLogs::ROSCloudWatchLogsErrors CloudWatchLogsFacade::CheckLogGroupExists()
in cloudwatch_logs_common/src/utils/cloudwatch_logs_facade.cpp
40 9 1
std::shared_ptr LogServiceFactory::CreateLogService()
in cloudwatch_logs_common/src/log_service_factory.cpp
39 2 5
static MetricDatum metricObjectToDatum()
in cloudwatch_metrics_common/include/cloudwatch_metrics_common/utils/metric_object.h
39 9 2
Aws::CloudWatchLogs::ROSCloudWatchLogsErrors LogPublisher::SendLogs()
in cloudwatch_logs_common/src/log_publisher.cpp
38 8 2
std::shared_ptr MetricServiceFactory::createMetricService()
in cloudwatch_metrics_common/src/metric_service_factory.cpp
38 2 4
MetricDatum deserializeMetricDatum()
in cloudwatch_metrics_common/src/utils/metric_serialization.cpp
38 9 1
FileObject MetricFileManager::readBatch()
in cloudwatch_metrics_common/src/utils/metric_file_manager.cpp
35 4 1
Aws::CloudWatchLogs::ROSCloudWatchLogsErrors CloudWatchLogsFacade::SendLogsRequest()
in cloudwatch_logs_common/src/utils/cloudwatch_logs_facade.cpp
34 7 2
bool LogPublisher::CreateGroup()
in cloudwatch_logs_common/src/log_publisher.cpp
31 6 0
DataToken FileManagerStrategy::read()
in file_management/src/file_upload/file_manager_strategy.cpp
31 6 1
bool LogPublisher::CreateStream()
in cloudwatch_logs_common/src/log_publisher.cpp
30 6 0
void printCache()
in file_management/src/file_upload/file_manager_strategy.cpp
30 5 3
CloudWatchMetricsStatus CloudWatchMetricsFacade::SendMetricsToCloudWatch()
in cloudwatch_metrics_common/src/utils/cloudwatch_metrics_facade.cpp
28 6 2
void FileManagerStrategy::resolve()
in file_management/src/file_upload/file_manager_strategy.cpp
27 6 2