aws-robotics / tts-ros2
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 42 units with 558 lines of code in units (80.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 1 simple units (33 lines of code)
    • 41 very simple units (525 lines of code)
0% | 0% | 0% | 5% | 94%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 0% | 0% | 5% | 94%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tts/tts/services0% | 0% | 0% | 11% | 88%
tts/integration_test0% | 0% | 0% | 0% | 100%
tts/tts/scripts0% | 0% | 0% | 0% | 100%
tts/launch0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _synthesize_speech_and_save()
in tts/tts/services/amazonpolly.py
33 10 2
def __call__()
in tts/tts/services/synthesizer.py
16 4 2
def main()
in tts/tts/services/synthesizer.py
37 4 0
def _make_audio_file_fullpath()
in tts/tts/services/amazonpolly.py
10 4 3
def node_request_handler()
in tts/tts/services/amazonpolly.py
26 4 3
def handle_result()
in tts/tts/scripts/voicer.py
18 4 2
def speak()
in tts/tts/scripts/voicer.py
9 4 1
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 __init__()
in tts/tts/services/synthesizer.py
19 3 7
def _parse_request_or_raise()
in tts/tts/services/synthesizer.py
8 3 2
def __init__()
in tts/tts/services/amazonpolly.py
11 3 6
def main()
in tts/tts/services/amazonpolly.py
25 3 0
def play()
in tts/tts/scripts/voicer.py
11 3 2
def _call_engine()
in tts/tts/services/synthesizer.py
7 2 2
def node_request_handler()
in tts/tts/services/synthesizer.py
10 2 3
def loginfo()
in tts/tts/services/amazonpolly.py
3 2 2