aws-robotics / tts-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 30 units with 296 lines of code in units (72.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (152 lines of code)
    • 1 small units (14 lines of code)
    • 23 very small units (130 lines of code)
0% | 0% | 51% | 4% | 43%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 51% | 4% | 43%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tts/src/tts0% | 0% | 49% | 5% | 45%
tts/scripts0% | 0% | 67% | 0% | 32%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _synthesize_speech_and_save()
in tts/src/tts/amazonpolly.py
33 10 2
def main()
in tts/src/tts/synthesizer.py
26 2 0
def retrieve_credentials()
in tts/src/tts/amazonpolly.py
26 5 1
def _node_request_handler()
in tts/src/tts/amazonpolly.py
24 4 2
def _get_polly_client()
in tts/src/tts/amazonpolly.py
22 2 6
def do_speak()
in tts/scripts/tts_node.py
21 4 1
def main()
in tts/src/tts/amazonpolly.py
14 1 0
def _make_audio_file_fullpath()
in tts/src/tts/amazonpolly.py
10 4 3
def __init__()
in tts/src/tts/synthesizer.py
9 3 3
def __init__()
in tts/src/tts/amazonpolly.py
9 2 5
def _generate_user_agent_suffix()
in tts/src/tts/amazonpolly.py
9 3 1
def _parse_request_or_raise()
in tts/src/tts/synthesizer.py
8 3 2
def _node_request_handler()
in tts/src/tts/synthesizer.py
8 2 2
def _call_engine()
in tts/src/tts/synthesizer.py
7 2 2
def get_ros_param()
in tts/src/tts/amazonpolly.py
7 3 2
def _pcm2wav()
in tts/src/tts/amazonpolly.py
7 1 4
def _dispatch()
in tts/src/tts/amazonpolly.py
7 2 2
def __call__()
in tts/src/tts/synthesizer.py
6 1 2
def load()
in tts/src/tts/amazonpolly.py
6 1 1
def __call__()
in tts/src/tts/synthesizer.py
5 1 2