aws / aws-encryption-sdk-python
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 297 units with 2,561 lines of code in units (58.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (160 lines of code)
    • 27 simple units (559 lines of code)
    • 265 very simple units (1,842 lines of code)
0% | 0% | 6% | 21% | 71%
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% | 6% | 21% | 71%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/aws_encryption_sdk0% | 0% | 6% | 22% | 71%
decrypt_oracle/src0% | 0% | 0% | 0% | 100%
doc0% | 0% | 0% | 0% | 100%
decrypt_oracle0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _read_bytes_to_framed_body()
in src/aws_encryption_sdk/streaming_client.py
49 12 2
def _check_mrk_arns_equal()
in src/aws_encryption_sdk/key_providers/kms.py
14 12 2
def decrypt_data_key()
in src/aws_encryption_sdk/key_providers/base.py
37 12 4
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 read()
in src/aws_encryption_sdk/streaming_client.py
22 10 2
def _read_bytes()
in src/aws_encryption_sdk/streaming_client.py
20 10 2
def validate_unique_mrks()
in src/aws_encryption_sdk/key_providers/kms.py
15 9 1
def __attrs_post_init__()
in src/aws_encryption_sdk/materials_managers/caching.py
17 9 1
def serialize_encryption_context()
in src/aws_encryption_sdk/internal/formatting/encryption_context.py
35 9 1
def __new__()
in src/aws_encryption_sdk/streaming_client.py
18 8 2
def _prep_message()
in src/aws_encryption_sdk/streaming_client.py
51 8 1
def _read_header()
in src/aws_encryption_sdk/streaming_client.py
49 8 1
def validate_config()
in src/aws_encryption_sdk/key_providers/kms.py
12 8 1
def validate_config()
in src/aws_encryption_sdk/key_providers/kms.py
19 8 1
def is_valid_mrk_identifier()
in src/aws_encryption_sdk/internal/arn.py
9 8 1
def deserialize_wrapped_key()
in src/aws_encryption_sdk/internal/formatting/deserialize.py
23 8 3
def _try_to_evict_one_entry()
in src/aws_encryption_sdk/caches/local.py
17 7 1
def owns_data_key()
in src/aws_encryption_sdk/key_providers/raw.py
30 7 2
def __new__()
in src/aws_encryption_sdk/key_providers/base.py
18 7 2