aws-samples / amazon-aurora-labs-for-mysql
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 24 units with 433 lines of code in units (7.0% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (57 lines of code)
    • 9 medium size units (239 lines of code)
    • 8 small units (114 lines of code)
    • 6 very small units (23 lines of code)
0% | 13% | 55% | 26% | 5%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 13% | 55% | 26% | 5%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
scripts0% | 14% | 53% | 28% | 4%
support0% | 0% | 100% | 0% | 0%
website/lambda/indexdoc-function/src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in scripts/replicatekey.py
57 20 0
def thread_func()
in scripts/weather_perf.py
42 11 6
def thread_func()
in scripts/reader_loadtest.py
29 8 6
def track_analytics()
in scripts/reader_loadtest.py
24 3 0
def track_analytics()
in scripts/simple_failover.py
24 3 0
def track_analytics()
in scripts/das_reader.py
24 3 0
def track_analytics()
in scripts/aware_failover.py
24 3 0
def track_analytics()
in scripts/bank_deposit.py
24 3 0
def track_analytics()
in scripts/weather_perf.py
24 3 0
def track_analytics()
in support/peer_vpcs.py
24 4 0
def make_deposit()
in scripts/bank_deposit.py
19 5 1
def progress_func()
in scripts/weather_perf.py
17 5 0
def progress_func()
in scripts/reader_loadtest.py
16 5 0
def show_summary()
in scripts/bank_deposit.py
14 3 3
def instance_dns_endpoint()
in scripts/aware_failover.py
13 4 2
def validateregion()
in scripts/replicatekey.py
12 5 1
def keyexists()
in scripts/replicatekey.py
12 5 1
def query_db()
in scripts/bank_deposit.py
11 5 3
def decrypt_payload()
in scripts/das_reader.py
7 1 2
def lambda_handler()
in website/lambda/indexdoc-function/src/function.py
5 3 2