aws-samples / postgres-lightweight-locks-simulator
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 13 units with 84 lines of code in units (3.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 0 medium size units (0 lines of code)
    • 2 small units (24 lines of code)
    • 11 very small units (60 lines of code)
0% | 0% | 0% | 28% | 71%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 0% | 28% | 71%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
django_app/logistics0% | 0% | 0% | 20% | 80%
django_app0% | 0% | 0% | 84% | 15%
pybusybox0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 13 longest units
Unit# linesMcCabe index# params
def insert()
in django_app/logistics/orders.py
13 1 1
def main()
in django_app/manage.py
11 2 0
def order_detail()
in django_app/logistics/views.py
8 1 2
def authuser()
in django_app/logistics/orders.py
8 1 1
def update()
in django_app/logistics/orders.py
8 1 2
def show()
in django_app/logistics/sdk.py
6 1 1
def todaysorders_detail()
in django_app/logistics/views.py
6 1 1
def allorders_detail()
in django_app/logistics/views.py
6 1 1
def show()
in django_app/logistics/authuser.py
5 1 1
def show()
in django_app/logistics/health.py
5 1 1
def main()
in pybusybox/main.py
4 2 0
def sighandler()
in pybusybox/main.py
2 1 2
def sighandler()
in django_app/manage.py
2 1 2