aws-deepracer / aws-deepracer-servo-pkg
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 22 units with 456 lines of code in units (61.6% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (146 lines of code)
    • 7 medium size units (196 lines of code)
    • 4 small units (60 lines of code)
    • 9 very small units (54 lines of code)
0% | 32% | 42% | 13% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp0% | 32% | 43% | 13% | 10%
py0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 32% | 43% | 13% | 10%
launch0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
int main()
in servo_pkg/src/servo_node.cpp
87 1 2
void ServoMgr::setCalFromFile()
in servo_pkg/src/servo_mgr.cpp
59 14 2
bool ServoMgr::calibrateServo()
in servo_pkg/src/servo_mgr.cpp
39 9 2
void ServoMgr::servoSubscriber()
in servo_pkg/src/servo_mgr.cpp
36 9 1
void ServoMgr::setCalHdl()
in servo_pkg/src/servo_mgr.cpp
28 6 3
void ServoMgr::getCalHdl()
in servo_pkg/src/servo_mgr.cpp
28 6 3
bool LedMgr::setLedCtrlHdl()
in servo_pkg/src/led_mgr.cpp
22 4 3
const std::string getSysPath()
in servo_pkg/src/pwm.cpp
22 7 0
void LedMgr::setLedValFromFile()
in servo_pkg/src/led_mgr.cpp
21 6 2
void ServoMgr::writeCalJSON()
in servo_pkg/src/servo_mgr.cpp
20 5 2
bool LedMgr::getLedCtrlHdl()
in servo_pkg/src/led_mgr.cpp
14 4 3
void LedMgr::writeLedValJSON()
in servo_pkg/src/led_mgr.cpp
14 4 2
void writePWM()
in servo_pkg/src/pwm.cpp
12 2 3
def generate_launch_description()
in servo_pkg/launch/servo_pkg_launch.py
9 1 0
void ServoMgr::rawPWMSubscriber()
in servo_pkg/src/servo_mgr.cpp
9 5 1
void writeJSONToFile()
in servo_pkg/src/utility.cpp
8 1 2
void ServoMgr::setGPIOHdl()
in servo_pkg/src/servo_mgr.cpp
7 2 3
bool checkFile()
in servo_pkg/src/utility.cpp
5 1 1
void Servo::setPeriod()
in servo_pkg/src/pwm.cpp
5 1 1
void Servo::setDuty()
in servo_pkg/src/pwm.cpp
5 1 1