awslabs / amazon-athena-cross-account-catalog
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 4,140 units with 38,087 lines of code in units (90.6% of code).
    • 2 very long units (257 lines of code)
    • 25 long units (1,597 lines of code)
    • 602 medium size units (17,358 lines of code)
    • 639 small units (9,949 lines of code)
    • 2,872 very small units (8,926 lines of code)
<1% | 4% | 45% | 26% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py<1% | 4% | 45% | 26% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
heracles/hive/hive_metastore<1% | 4% | 46% | 25% | 22%
heracles/handlers0% | 16% | 33% | 18% | 30%
heracles/hive/fb3030% | 0% | 20% | 45% | 34%
heracles/clients0% | 0% | 0% | 27% | 72%
heracles0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def __init__()
in heracles/hive/hive_metastore/ThriftHiveMetastore.py
155 1 2
def read()
in heracles/hive/hive_metastore/ttypes.py
102 46 2
def read()
in heracles/hive/hive_metastore/ttypes.py
98 40 2
def read()
in heracles/hive/hive_metastore/ttypes.py
93 44 2
def read()
in heracles/hive/hive_metastore/ttypes.py
83 42 2
def read()
in heracles/hive/hive_metastore/ttypes.py
78 40 2
def write()
in heracles/hive/hive_metastore/ttypes.py
74 28 2
def write()
in heracles/hive/hive_metastore/ttypes.py
71 25 2
def read()
in heracles/hive/hive_metastore/ttypes.py
70 34 2
def write()
in heracles/hive/hive_metastore/ttypes.py
68 25 2
def read()
in heracles/hive/hive_metastore/ttypes.py
66 29 2
def read()
in heracles/hive/hive_metastore/ttypes.py
64 21 2
def write()
in heracles/hive/hive_metastore/ttypes.py
63 25 2
def read()
in heracles/hive/hive_metastore/ttypes.py
59 27 2
def write()
in heracles/hive/hive_metastore/ttypes.py
59 24 2
def read()
in heracles/hive/hive_metastore/ttypes.py
58 28 2
def read()
in heracles/hive/hive_metastore/ttypes.py
55 27 2
def read()
in heracles/hive/hive_metastore/ttypes.py
55 24 2
def read()
in heracles/hive/hive_metastore/ttypes.py
55 20 2
def read()
in heracles/hive/hive_metastore/ttypes.py
55 24 2