aws-robotics / cloudwatchmetrics-ros2
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 20 units with 432 lines of code in units (66.2% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (118 lines of code)
    • 8 medium size units (211 lines of code)
    • 5 small units (68 lines of code)
    • 5 very small units (35 lines of code)
0% | 27% | 48% | 15% | 8%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp0% | 17% | 55% | 17% | 9%
py0% | 100% | 0% | 0% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 17% | 55% | 17% | 9%
launch0% | 100% | 0% | 0% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
int main()
in cloudwatch_metrics_collector/src/main.cpp
65 2 2
def generate_launch_description()
in cloudwatch_metrics_collector/launch/cloudwatch_metrics_collector.launch.py
53 8 0
void ReadUploaderOptions()
in cloudwatch_metrics_collector/src/metrics_collector_parameter_helper.cpp
34 1 2
int MetricsCollector::RecordMetrics()
in cloudwatch_metrics_collector/src/metrics_collector.cpp
30 5 1
void ReadFileManagerStrategyOptions()
in cloudwatch_metrics_collector/src/metrics_collector_parameter_helper.cpp
29 1 2
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
19 1 9
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
bool MetricsCollector::checkIfOnline()
in cloudwatch_metrics_collector/src/metrics_collector.cpp
11 3 2
void ReadTopics()
in cloudwatch_metrics_collector/src/metrics_collector_parameter_helper.cpp
10 2 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 0
int64_t MetricsCollector::GetMetricDataEpochMillis()
in cloudwatch_metrics_collector/src/metrics_collector.cpp
4 1 1