microsoft / Azure_Kinect_ROS_Driver
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 52 units with 1,341 lines of code in units (50.6% of code).
    • 2 very long units (449 lines of code)
    • 2 long units (153 lines of code)
    • 12 medium size units (344 lines of code)
    • 17 small units (273 lines of code)
    • 19 very small units (122 lines of code)
33% | 11% | 25% | 20% | 9%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp33% | 11% | 25% | 20% | 8%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src33% | 11% | 25% | 20% | 8%
include/azure_kinect_ros_driver0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
278 72 0
171 34 1
94 24 0
59 12 0
47 5 3
37 6 0
31 3 2
void K4ACalibrationTransformData::initialize()
in src/k4a_calibration_transform_data.cpp
28 8 1
int main()
in src/k4a_ros_bridge_node.cpp
28 4 2
27 1 4
26 3 3
void K4ACalibrationTransformData::printCameraCalibration()
in src/k4a_calibration_transform_data.cpp
25 1 1
25 4 3
24 3 2
23 3 2
23 3 2
20 3 2
void K4ACalibrationTransformData::publishRgbToDepthTf()
in src/k4a_calibration_transform_data.cpp
19 1 0
void K4ACalibrationTransformData::publishImuToDepthTf()
in src/k4a_calibration_transform_data.cpp
19 1 0
void K4ACalibrationTransformData::getDepthCameraInfo()
in src/k4a_calibration_transform_data.cpp
19 1 1