awslabs / amazon-dynamodb-tools
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 21 units with 435 lines of code in units (83.5% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (80 lines of code)
    • 6 medium size units (206 lines of code)
    • 8 small units (120 lines of code)
    • 6 very small units (29 lines of code)
0% | 18% | 47% | 27% | 6%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 18% | 47% | 27% | 6%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ddbtools0% | 26% | 46% | 17% | 9%
ROOT0% | 0% | 48% | 51% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
80 6 5
def get_table_pricing_data()
in ddbtools/table.py
49 11 2
def run()
in table_class_evaluator.py
45 12 1
35 8 2
31 6 2
def get_storage_class_pricing()
in ddbtools/pricing.py
25 3 3
def __init__()
in table_class_evaluator.py
21 1 2
20 4 3
def get_table_tags()
in ddbtools/table.py
18 6 4
def run()
in table_tagger.py
16 3 1
15 4 4
def main()
in table_class_evaluator.py
14 1 0
def get_table_names()
in ddbtools/table.py
13 5 3
def main()
in table_tagger.py
13 1 0
def __init__()
in table_tagger.py
11 1 2
def get_table_arn()
in ddbtools/table.py
8 2 2
def get_storage_pricing()
in ddbtools/pricing.py
7 1 2
def __init__()
in ddbtools/pricing.py
5 3 2
def default()
in ddbtools/util.py
4 2 2
def __init__()
in ddbtools/table.py
3 1 2