aws / aws-xray-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 425 units with 3,022 lines of code in units (74.4% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (59 lines of code)
    • 20 medium size units (601 lines of code)
    • 72 small units (1,001 lines of code)
    • 332 very small units (1,361 lines of code)
0% | 1% | 19% | 33% | 45%
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% | 19% | 33% | 45%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
aws_xray_sdk/ext/bottle0% | 80% | 0% | 0% | 19%
aws_xray_sdk/core0% | 0% | 28% | 23% | 47%
aws_xray_sdk/ext/django0% | 0% | 54% | 15% | 30%
aws_xray_sdk/ext/sqlalchemy0% | 0% | 75% | 16% | 8%
aws_xray_sdk/core/utils0% | 0% | 56% | 24% | 19%
aws_xray_sdk/core/models0% | 0% | 9% | 43% | 47%
aws_xray_sdk/ext/sqlalchemy_core0% | 0% | 48% | 40% | 12%
aws_xray_sdk/ext/flask0% | 0% | 40% | 50% | 9%
aws_xray_sdk/ext/httplib0% | 0% | 21% | 43% | 34%
aws_xray_sdk/ext0% | 0% | 13% | 32% | 53%
aws_xray_sdk/ext/pynamodb0% | 0% | 43% | 56% | 0%
aws_xray_sdk/core/sampling0% | 0% | 0% | 35% | 64%
aws_xray_sdk/ext/psycopg20% | 0% | 0% | 86% | 13%
aws_xray_sdk/ext/botocore0% | 0% | 0% | 100% | 0%
aws_xray_sdk/ext/aiobotocore0% | 0% | 0% | 100% | 0%
aws_xray_sdk/core/streaming0% | 0% | 0% | 48% | 51%
aws_xray_sdk/core/plugins0% | 0% | 0% | 16% | 83%
aws_xray_sdk/ext/pymongo0% | 0% | 0% | 37% | 62%
aws_xray_sdk/ext/pymysql0% | 0% | 0% | 44% | 55%
aws_xray_sdk/ext/pg80000% | 0% | 0% | 57% | 42%
aws_xray_sdk/ext/requests0% | 0% | 0% | 31% | 68%
aws_xray_sdk/ext/flask_sqlalchemy0% | 0% | 0% | 44% | 56%
aws_xray_sdk/ext/mysql0% | 0% | 0% | 47% | 52%
aws_xray_sdk/ext/aiohttp0% | 0% | 0% | 100% | 0%
aws_xray_sdk/core/emitters0% | 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%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def apply()
in aws_xray_sdk/ext/bottle/middleware.py
59 8 3
def __call__()
in aws_xray_sdk/ext/django/middleware.py
46 7 2
def configure()
in aws_xray_sdk/core/recorder.py
46 20 15
def xray_on_call()
in aws_xray_sdk/ext/sqlalchemy/util/decorators.py
42 16 2
def _sql_meta()
in aws_xray_sdk/ext/sqlalchemy_core/patch.py
36 9 2
def _before_request()
in aws_xray_sdk/ext/flask/middleware.py
35 4 1
def wildcard_match()
in aws_xray_sdk/core/utils/search_pattern.py
34 5 3
def _external_module_patch()
in aws_xray_sdk/core/patcher.py
32 13 2
def ready()
in aws_xray_sdk/ext/django/apps.py
31 9 1
def record_subsegment()
in aws_xray_sdk/core/recorder.py
30 6 8
def _send_request()
in aws_xray_sdk/ext/httplib/patch.py
28 7 4
def patch()
in aws_xray_sdk/core/patcher.py
28 18 3
def metadata_to_dict()
in aws_xray_sdk/core/utils/conversion.py
27 13 1
def _patch_cursor()
in aws_xray_sdk/ext/django/db.py
26 7 2
def aws_meta_processor()
in aws_xray_sdk/ext/boto_utils.py
24 8 8
def to_dict()
in aws_xray_sdk/core/models/entity.py
24 12 1
def from_header_str()
in aws_xray_sdk/core/models/trace_header.py
23 6 2
def __init__()
in aws_xray_sdk/core/recorder.py
23 3 1
def parse_bind()
in aws_xray_sdk/ext/sqlalchemy/util/decorators.py
22 6 1
def pynamodb_meta_processor()
in aws_xray_sdk/ext/pynamodb/patch.py
22 6 8