aws / aws-xray-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 425 units with 3,022 lines of code in units (74.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 10 medium complex units (265 lines of code)
    • 32 simple units (630 lines of code)
    • 383 very simple units (2,127 lines of code)
0% | 0% | 8% | 20% | 70%
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% | 8% | 20% | 70%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
aws_xray_sdk/core0% | 0% | 20% | 14% | 65%
aws_xray_sdk/ext/sqlalchemy0% | 0% | 49% | 42% | 8%
aws_xray_sdk/core/utils0% | 0% | 25% | 13% | 61%
aws_xray_sdk/core/sampling0% | 0% | 5% | 12% | 82%
aws_xray_sdk/core/models0% | 0% | 4% | 13% | 81%
aws_xray_sdk/ext0% | 0% | 10% | 21% | 68%
aws_xray_sdk/ext/django0% | 0% | 0% | 63% | 36%
aws_xray_sdk/ext/bottle0% | 0% | 0% | 80% | 19%
aws_xray_sdk/ext/httplib0% | 0% | 0% | 31% | 68%
aws_xray_sdk/ext/sqlalchemy_core0% | 0% | 0% | 48% | 52%
aws_xray_sdk/ext/pynamodb0% | 0% | 0% | 43% | 56%
aws_xray_sdk/ext/flask0% | 0% | 0% | 22% | 77%
aws_xray_sdk/ext/botocore0% | 0% | 0% | 48% | 51%
aws_xray_sdk/core/streaming0% | 0% | 0% | 48% | 51%
aws_xray_sdk/core/plugins0% | 0% | 0% | 0% | 100%
aws_xray_sdk/ext/psycopg20% | 0% | 0% | 0% | 100%
aws_xray_sdk/ext/requests0% | 0% | 0% | 0% | 100%
aws_xray_sdk/ext/pymongo0% | 0% | 0% | 0% | 100%
aws_xray_sdk/core/emitters0% | 0% | 0% | 0% | 100%
aws_xray_sdk/ext/pymysql0% | 0% | 0% | 0% | 100%
aws_xray_sdk/ext/flask_sqlalchemy0% | 0% | 0% | 0% | 100%
aws_xray_sdk/ext/mysql0% | 0% | 0% | 0% | 100%
aws_xray_sdk/ext/pg80000% | 0% | 0% | 0% | 100%
aws_xray_sdk0% | 0% | 0% | 0% | 100%
aws_xray_sdk/ext/sqlite30% | 0% | 0% | 0% | 100%
sample-apps/flask0% | 0% | 0% | 0% | 100%
aws_xray_sdk/ext/aiobotocore0% | 0% | 0% | 0% | 100%
aws_xray_sdk/ext/aiohttp0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def configure()
in aws_xray_sdk/core/recorder.py
46 20 15
def patch()
in aws_xray_sdk/core/patcher.py
28 18 3
def xray_on_call()
in aws_xray_sdk/ext/sqlalchemy/util/decorators.py
42 16 2
def _external_module_patch()
in aws_xray_sdk/core/patcher.py
32 13 2
def metadata_to_dict()
in aws_xray_sdk/core/utils/conversion.py
27 13 1
def _borrow_or_take()
in aws_xray_sdk/core/sampling/reservoir.py
13 12 3
def to_dict()
in aws_xray_sdk/core/models/entity.py
24 12 1
def begin_segment()
in aws_xray_sdk/core/recorder.py
22 12 5
def _extract_whitelisted_params()
in aws_xray_sdk/ext/boto_utils.py
18 11 6
def match()
in aws_xray_sdk/core/sampling/sampling_rule.py
13 11 2
def _ignore_request()
in aws_xray_sdk/ext/httplib/patch.py
14 10 3
def _stream()
in aws_xray_sdk/core/streaming/default_streaming.py
13 10 3
def _validate()
in aws_xray_sdk/core/sampling/local/sampling_rule.py
12 10 1
def get_stacktrace()
in aws_xray_sdk/core/utils/stacktrace.py
15 10 1
def _sql_meta()
in aws_xray_sdk/ext/sqlalchemy_core/patch.py
36 9 2
def ready()
in aws_xray_sdk/ext/django/apps.py
31 9 1
def _patch_class()
in aws_xray_sdk/core/patcher.py
17 9 2
def __init__()
in aws_xray_sdk/core/models/trace_header.py
12 9 5
def apply()
in aws_xray_sdk/ext/bottle/middleware.py
59 8 3
def inject_header()
in aws_xray_sdk/ext/boto_utils.py
13 8 4