aws / amazon-braket-schemas-python
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 8 units with 52 lines of code in units (4.1% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 0 medium size units (0 lines of code)
    • 1 small units (20 lines of code)
    • 7 very small units (32 lines of code)
0% | 0% | 0% | 38% | 61%
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% | 0% | 38% | 61%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/braket/ir/jaqcd0% | 0% | 0% | 80% | 20%
src/braket/schema_common0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 8 longest units
Unit# linesMcCabe index# params
def validate_instructions()
in src/braket/ir/jaqcd/program_v1.py
20 10 3
def import_schema_module()
in src/braket/schema_common/schema_header.py
10 2 1
def parse_raw_schema()
in src/braket/schema_common/schema_base.py
6 1 1
def get_schema_class()
in src/braket/schema_common/schema_base.py
5 2 2
def validate_probabilities()
in src/braket/ir/jaqcd/shared_models.py
5 2 2
def import_schema_module()
in src/braket/schema_common/schema_base.py
2 1 1
def get_module_name()
in src/braket/schema_common/schema_header.py
2 1 1
def get_package_name()
in src/braket/schema_common/schema_header.py
2 1 1