aws / amazon-braket-containers
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 64 units with 773 lines of code in units (68.0% of code).
    • 1 very long units (165 lines of code)
    • 1 long units (76 lines of code)
    • 5 medium size units (135 lines of code)
    • 8 small units (127 lines of code)
    • 49 very small units (270 lines of code)
21% | 9% | 17% | 16% | 34%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py21% | 9% | 17% | 16% | 34%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src21% | 9% | 17% | 16% | 34%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def image_builder()
in src/image_builder.py
165 36 1
def build()
in src/image.py
76 14 1
32 14 1
29 10 3
def progress()
in src/output.py
26 5 2
25 10 3
def get_code_setup_parameters()
in src/braket_container.py
23 10 0
def push()
in src/metrics.py
19 3 5
def download_file()
in src/utils.py
18 4 2
def pr_build_setup()
in src/utils.py
18 4 2
def push_image_metrics()
in src/metrics.py
17 3 2
16 6 3
def override()
in src/buildspec.py
15 9 2
def unpack_code_and_add_to_path()
in src/braket_container.py
12 4 2
12 3 2
def kick_off_customer_script()
in src/braket_container.py
10 2 1
def run_customer_code()
in src/braket_container.py
10 3 0
def add()
in src/context.py
10 5 2
10 8 2
def join()
in src/buildspec.py
10 4 3