aws-robotics / tts-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 42 units with 558 lines of code in units (80.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 11 medium size units (339 lines of code)
    • 5 small units (75 lines of code)
    • 26 very small units (144 lines of code)
0% | 0% | 60% | 13% | 25%
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% | 60% | 13% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tts/integration_test0% | 0% | 92% | 0% | 7%
tts/tts/services0% | 0% | 50% | 16% | 32%
tts/tts/scripts0% | 0% | 0% | 50% | 50%
tts/launch0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in tts/tts/services/synthesizer.py
37 4 0
def test_plain_text_to_wav_via_polly_node()
in tts/integration_test/tts_integration.py
35 4 1
def test_plain_text_via_synthesizer_node()
in tts/integration_test/tts_integration.py
35 4 1
def test_plain_text_to_mp3_via_polly_node()
in tts/integration_test/tts_integration.py
35 4 1
def test_simple_ssml_via_polly_node()
in tts/integration_test/tts_integration.py
35 4 1
def test_simple_ssml_via_synthesizer_node()
in tts/integration_test/tts_integration.py
35 4 1
def _synthesize_speech_and_save()
in tts/tts/services/amazonpolly.py
33 10 2
def node_request_handler()
in tts/tts/services/amazonpolly.py
26 4 3
def main()
in tts/tts/services/amazonpolly.py
25 3 0
def test_plain_text_using_polly_class()
in tts/integration_test/tts_integration.py
22 1 1
def _get_polly_client()
in tts/tts/services/amazonpolly.py
21 2 6
def __init__()
in tts/tts/services/synthesizer.py
19 3 7
def handle_result()
in tts/tts/scripts/voicer.py
18 4 2
def __call__()
in tts/tts/services/synthesizer.py
16 4 2
def __init__()
in tts/tts/services/amazonpolly.py
11 3 6
def play()
in tts/tts/scripts/voicer.py
11 3 2
def node_request_handler()
in tts/tts/services/synthesizer.py
10 2 3
def _make_audio_file_fullpath()
in tts/tts/services/amazonpolly.py
10 4 3
def generate_launch_description()
in tts/launch/tts.launch.py
9 1 0
def speak()
in tts/tts/scripts/voicer.py
9 4 1