aws-samples / amazon-aurora-call-to-amazon-sagemaker-sample
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 4,230 units with 42,368 lines of code in units (62.2% of code).
    • 13 very long units (1,678 lines of code)
    • 81 long units (5,175 lines of code)
    • 417 medium size units (12,507 lines of code)
    • 676 small units (9,828 lines of code)
    • 3,043 very small units (13,180 lines of code)
3% | 12% | 29% | 23% | 31%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py3% | 12% | 29% | 23% | 31%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
stk-sample/lambda/stk-player-events-loader-mysql3% | 11% | 29% | 23% | 31%
stk-sample/lambda/stk-player-events-loader-pg7% | 12% | 28% | 22% | 29%
stk-sample/ec2/ec2_build0% | 100% | 0% | 0% | 0%
stk-sample/lambda/stk-player-events-filter0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def add_ui()
in stk-sample/lambda/stk-player-events-loader-mysql/package/setuptools/_distutils/command/bdist_msi.py
224 10 1
def config()
in stk-sample/lambda/stk-player-events-loader-mysql/package/mysql/connector/abstracts.py
185 63 2
def _build()
in stk-sample/lambda/stk-player-events-loader-pg/package/asn1crypto/core.py
162 48 9
def __init__()
in stk-sample/lambda/stk-player-events-loader-pg/package/asn1crypto/core.py
132 46 11
def get_connection()
in stk-sample/lambda/stk-player-events-loader-mysql/package/mysqlx/connection.py
118 31 2
def convert_paramstyle()
in stk-sample/lambda/stk-player-events-loader-pg/package/pg8000/dbapi.py
116 28 3
def lex()
in stk-sample/lambda/stk-player-events-loader-mysql/package/mysqlx/expr.py
110 49 1
def _MergeField()
in stk-sample/lambda/stk-player-events-loader-mysql/package/google/protobuf/text_format.py
109 25 3
def upload_file()
in stk-sample/lambda/stk-player-events-loader-mysql/package/setuptools/_distutils/command/upload.py
106 25 4
def _parse_children()
in stk-sample/lambda/stk-player-events-loader-pg/package/asn1crypto/core.py
106 40 2
def _make_spec_file()
in stk-sample/lambda/stk-player-events-loader-mysql/package/setuptools/_distutils/command/bdist_rpm.py
105 21 1
def run()
in stk-sample/lambda/stk-player-events-loader-mysql/package/setuptools/_distutils/command/bdist_rpm.py
103 26 1
def finalize_options()
in stk-sample/lambda/stk-player-events-loader-mysql/package/setuptools/command/easy_install.py
102 18 1
def execute()
in stk-sample/lambda/stk-player-events-loader-mysql/package/mysqlx/statement.py
93 29 1
def finalize_options()
in stk-sample/lambda/stk-player-events-loader-mysql/package/setuptools/_distutils/command/build_ext.py
92 33 1
def _ConvertFieldValuePair()
in stk-sample/lambda/stk-player-events-loader-mysql/package/google/protobuf/json_format.py
92 35 3
def validate_connection_attributes()
in stk-sample/lambda/stk-player-events-loader-mysql/package/mysqlx/__init__.py
88 34 1
def EnumDecoder()
in stk-sample/lambda/stk-player-events-loader-mysql/package/google/protobuf/internal/decoder.py
88 25 6
def switch_to_ssl()
in stk-sample/lambda/stk-player-events-loader-mysql/package/mysql/connector/network.py
87 30 8
def make_stmt_execute()
in stk-sample/lambda/stk-player-events-loader-mysql/package/mysql/connector/protocol.py
84 23 3