awslabs / amazon-transcribe-streaming-sdk
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 176 units with 805 lines of code in units (50.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (30 lines of code)
    • 12 small units (159 lines of code)
    • 163 very small units (616 lines of code)
0% | 0% | 3% | 19% | 76%
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% | 3% | 19% | 76%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
amazon_transcribe0% | 0% | 3% | 19% | 76%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _encode_header_val()
in amazon_transcribe/eventstream.py
30 14 2
def read()
in amazon_transcribe/structures.py
18 9 2
def __init__()
in amazon_transcribe/model.py
16 1 0
def prepare_body()
in amazon_transcribe/request.py
15 5 1
def __init__()
in amazon_transcribe/model.py
14 1 0
def readinto()
in amazon_transcribe/structures.py
13 4 3
def serialize()
in amazon_transcribe/eventstream.py
13 5 3
def _parse_event_exception()
in amazon_transcribe/deserialize.py
13 2 2
def _add_required_headers()
in amazon_transcribe/utils.py
12 2 3
def write()
in amazon_transcribe/structures.py
12 5 2
def get_chunk()
in amazon_transcribe/httpsession.py
11 3 1
def _get_error_message()
in amazon_transcribe/deserialize.py
11 4 2
def _parse_item()
in amazon_transcribe/deserialize.py
11 1 2
def __init__()
in amazon_transcribe/model.py
10 1 0
def _create_audio_stream()
in amazon_transcribe/client.py
10 1 2
def parse()
in amazon_transcribe/deserialize.py
10 4 2
def _parse_result()
in amazon_transcribe/deserialize.py
10 1 2
def to_response_dict()
in amazon_transcribe/eventstream.py
9 3 2
def prepare()
in amazon_transcribe/request.py
8 1 1
def prepare_params()
in amazon_transcribe/request.py
8 3 1