awslabs / pgbouncer-rr-patch
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 9 units with 234 lines of code in units (56.4% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (142 lines of code)
    • 1 medium size units (29 lines of code)
    • 2 small units (29 lines of code)
    • 4 very small units (34 lines of code)
0% | 60% | 12% | 12% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 65% | 13% | 13% | 7%
py0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 65% | 13% | 13% | 7%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 9 longest units
Unit# linesMcCabe index# params
bool rewrite_query()
in src/rewrite_query.c
85 15 2
bool route_client_connection()
in src/route_connection.c
57 8 2
void printHex()
in src/rewrite_query.c
29 8 2
16 3 2
bool is_rewritten()
in src/rewrite_query.c
13 3 1
def rewrite_query()
in rewrite_query.py
10 3 2
10 2 1
bool is_rewrite_enabled()
in src/rewrite_query.c
7 2 1
def routing_rules()
in routing_rules.py
7 2 2