aws / aws-encryption-sdk-python
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 297 units with 2,561 lines of code in units (58.2% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (51 lines of code)
    • 25 medium size units (769 lines of code)
    • 47 small units (712 lines of code)
    • 224 very small units (1,029 lines of code)
0% | 1% | 30% | 27% | 40%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 1% | 30% | 27% | 40%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/aws_encryption_sdk0% | 2% | 30% | 27% | 39%
decrypt_oracle/src0% | 0% | 0% | 37% | 62%
doc0% | 0% | 0% | 0% | 100%
decrypt_oracle0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _prep_message()
in src/aws_encryption_sdk/streaming_client.py
51 8 1
def _read_bytes_to_framed_body()
in src/aws_encryption_sdk/streaming_client.py
49 12 2
def _read_header()
in src/aws_encryption_sdk/streaming_client.py
49 8 1
def _serialize_header_v1()
in src/aws_encryption_sdk/internal/formatting/serialize.py
44 3 2
def decrypt_data_key()
in src/aws_encryption_sdk/key_providers/base.py
37 12 4
def _serialize_header_v2()
in src/aws_encryption_sdk/internal/formatting/serialize.py
37 4 2
def serialize_encryption_context()
in src/aws_encryption_sdk/internal/formatting/encryption_context.py
35 9 1
def _read_bytes_from_framed_body()
in src/aws_encryption_sdk/streaming_client.py
34 5 2
def get_encryption_materials()
in src/aws_encryption_sdk/materials_managers/default.py
34 5 2
def deserialize_frame()
in src/aws_encryption_sdk/internal/formatting/deserialize.py
33 4 3
def _decrypt_data_key()
in src/aws_encryption_sdk/key_providers/kms.py
31 5 4
def get_encryption_materials()
in src/aws_encryption_sdk/materials_managers/caching.py
31 6 2
def _prep_non_framed()
in src/aws_encryption_sdk/streaming_client.py
30 2 1
def _read_bytes_from_non_framed_body()
in src/aws_encryption_sdk/streaming_client.py
30 4 2
def owns_data_key()
in src/aws_encryption_sdk/key_providers/raw.py
30 7 2
def _ecc_decode_compressed_point()
in src/aws_encryption_sdk/internal/crypto/elliptic_curve.py
30 12 2
def arn_from_str()
in src/aws_encryption_sdk/internal/arn.py
30 12 1
def generate_header()
in src/aws_encryption_sdk/streaming_client.py
25 4 2
def deserialize_encryption_context()
in src/aws_encryption_sdk/internal/formatting/encryption_context.py
25 6 1
def _generate_data_key()
in src/aws_encryption_sdk/key_providers/kms.py
23 6 3