awsdocs / aws-panorama-developer-guide
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 18 units with 247 lines of code in units (49.1% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (93 lines of code)
    • 6 small units (104 lines of code)
    • 8 very small units (50 lines of code)
0% | 0% | 37% | 42% | 20%
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% | 37% | 42% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
custom-model/code0% | 0% | 44% | 43% | 12%
custom-model/code/model0% | 0% | 25% | 39% | 34%
Alternative Visuals
Longest Units
Top 18 longest units
Unit# linesMcCabe index# params
def init()
in sample-apps/custom-model/code/application.py
25 3 4
def entry()
in sample-apps/custom-model/code/application.py
24 4 3
def compile_model()
in sample-apps/custom-model/code/model/model.py
23 1 8
def process_media()
in sample-apps/custom-model/code/application.py
21 5 2
def compile()
in sample-apps/custom-model/code/keras-model.py
19 3 2
def export_model()
in sample-apps/custom-model/code/model/model.py
18 2 3
def package_model()
in sample-apps/custom-model/code/model/model.py
17 1 3
def interface()
in sample-apps/custom-model/code/application.py
17 1 1
def put_metric()
in sample-apps/custom-model/code/application.py
17 1 3
def preprocess()
in sample-apps/custom-model/code/application.py
16 1 2
def wait_compilation()
in sample-apps/custom-model/code/model/model.py
9 4 2
def wait_packaging()
in sample-apps/custom-model/code/model/model.py
9 4 2
def __init__()
in sample-apps/custom-model/code/keras-model.py
9 2 1
def process_results()
in sample-apps/custom-model/code/application.py
8 7 3
def remove()
in sample-apps/custom-model/code/model/model.py
6 6 2
def upload()
in sample-apps/custom-model/code/model/model.py
4 1 4
def __init__()
in sample-apps/custom-model/code/model/model.py
3 1 3
def main()
in sample-apps/custom-model/code/application.py
2 1 0