aws-robotics / cloudwatchmetrics-ros1
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 19 units with 364 lines of code in units (61.5% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (52 lines of code)
    • 8 medium size units (210 lines of code)
    • 6 small units (77 lines of code)
    • 4 very small units (25 lines of code)
0% | 14% | 57% | 21% | 6%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp0% | 14% | 57% | 21% | 6%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 14% | 57% | 21% | 6%
Alternative Visuals
Longest Units
Top 19 longest units
Unit# linesMcCabe index# params
int main()
in cloudwatch_metrics_collector/src/main.cpp
52 2 2
void ReadUploaderOptions()
in cloudwatch_metrics_collector/src/metrics_collector_parameter_helper.cpp
34 1 2
void ReadFileManagerStrategyOptions()
in cloudwatch_metrics_collector/src/metrics_collector_parameter_helper.cpp
29 1 2
int MetricsCollector::RecordMetrics()
in cloudwatch_metrics_collector/src/metrics_collector.cpp
29 5 1
void ReadMetricDimensions()
in cloudwatch_metrics_collector/src/metrics_collector_parameter_helper.cpp
27 5 3
void ReadStorageResolution()
in cloudwatch_metrics_collector/src/metrics_collector_parameter_helper.cpp
25 3 2
void ReadOption()
in cloudwatch_metrics_collector/src/metrics_collector_parameter_helper.cpp
23 3 4
void ReadPublishFrequency()
in cloudwatch_metrics_collector/src/metrics_collector_parameter_helper.cpp
22 3 2
void ReadOption()
in cloudwatch_metrics_collector/src/metrics_collector_parameter_helper.cpp
21 3 4
void MetricsCollector::Initialize()
in cloudwatch_metrics_collector/src/metrics_collector.cpp
17 1 8
void ReadMetricNamespace()
in cloudwatch_metrics_collector/src/metrics_collector_parameter_helper.cpp
14 2 2
void ReadCloudWatchOptions()
in cloudwatch_metrics_collector/src/metrics_collector_parameter_helper.cpp
12 1 2
void MetricsCollector::SubscribeAllTopics()
in cloudwatch_metrics_collector/src/metrics_collector.cpp
12 2 0
void ReadTopics()
in cloudwatch_metrics_collector/src/metrics_collector_parameter_helper.cpp
11 3 1
bool MetricsCollector::checkIfOnline()
in cloudwatch_metrics_collector/src/metrics_collector.cpp
11 3 2
bool MetricsCollector::start()
in cloudwatch_metrics_collector/src/metrics_collector.cpp
9 2 0
bool MetricsCollector::shutdown()
in cloudwatch_metrics_collector/src/metrics_collector.cpp
7 2 0
void MetricsCollector::TriggerPublish()
in cloudwatch_metrics_collector/src/metrics_collector.cpp
5 1 1
int64_t MetricsCollector::GetMetricDataEpochMillis()
in cloudwatch_metrics_collector/src/metrics_collector.cpp
4 1 1