aws-quickstart / quickstart-jfrog-artifactory
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 253 units with 1,840 lines of code in units (23.3% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (124 lines of code)
    • 14 medium size units (375 lines of code)
    • 34 small units (491 lines of code)
    • 203 very small units (850 lines of code)
0% | 6% | 20% | 26% | 46%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 6% | 20% | 26% | 46%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
xray-setup/psycopg20% | 8% | 14% | 28% | 48%
xray-setup/crhelper0% | 0% | 40% | 22% | 37%
xray-setup0% | 0% | 85% | 0% | 14%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def execute_values()
in xray-setup/psycopg2/extras.py
62 8 6
def lru_cache()
in xray-setup/psycopg2/_lru_cache.py
62 13 1
def start_replication()
in xray-setup/psycopg2/extras.py
43 6 8
def __init__()
in xray-setup/crhelper/resource_helper.py
39 4 6
def register_hstore()
in xray-setup/psycopg2/extras.py
29 17 5
def format()
in xray-setup/psycopg2/sql.py
27 10 3
def _create_ranges()
in xray-setup/psycopg2/_range.py
26 14 3
def format()
in xray-setup/crhelper/log_helper.py
25 8 2
def getquoted()
in xray-setup/psycopg2/_range.py
24 7 1
def __call__()
in xray-setup/crhelper/resource_helper.py
24 10 3
def _send_response()
in xray-setup/crhelper/utils.py
24 4 2
def create()
in xray-setup/handler.py
24 3 2
def parse()
in xray-setup/psycopg2/_range.py
23 9 3
def _crhelper_init()
in xray-setup/crhelper/resource_helper.py
23 4 3
def _putconn()
in xray-setup/psycopg2/pool.py
22 13 4
def _split_sql()
in xray-setup/psycopg2/extras.py
22 8 1
def make_dsn()
in xray-setup/psycopg2/extensions.py
20 7 2
def create_replication_slot()
in xray-setup/psycopg2/extras.py
20 6 4
def register_inet()
in xray-setup/psycopg2/extras.py
19 5 2
def parse()
in xray-setup/psycopg2/extras.py
19 7 4