aws-samples / sagemaker-studio-notebook-magic-cell
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 57 units with 278 lines of code in units (60.0% 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)
    • 6 small units (86 lines of code)
    • 51 very small units (192 lines of code)
0% | 0% | 0% | 30% | 69%
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% | 30% | 69%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
sage_maker_magic/sage_maker_kernel0% | 0% | 0% | 30% | 69%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _submit()
in sage_maker_magic/sage_maker_kernel/kernelmagics.py
16 1 1
def __init__()
in sage_maker_magic/sage_maker_kernel/kernel.py
16 3 9
def main()
in sage_maker_magic/sage_maker_kernel/install.py
15 4 1
def __init__()
in sage_maker_magic/sage_maker_kernel/kernel.py
14 1 2
def __init__()
in sage_maker_magic/sage_maker_kernel/kernelmagics.py
13 1 3
def tf_distribution()
in sage_maker_magic/sage_maker_kernel/kernelmagics.py
12 1 2
def _submit()
in sage_maker_magic/sage_maker_kernel/kernelmagics.py
10 1 1
def _load_aliases_extension()
in sage_maker_magic/sage_maker_kernel/kernel.py
10 1 1
def _execute_cell()
in sage_maker_magic/sage_maker_kernel/kernel.py
9 4 8
def upload_content()
in sage_maker_magic/sage_maker_kernel/kernelmagics.py
8 2 2
def _full_fill_args()
in sage_maker_magic/sage_maker_kernel/kernelmagics.py
8 5 1
def install_my_kernel_spec()
in sage_maker_magic/sage_maker_kernel/install.py
7 1 2
def metric_definitions()
in sage_maker_magic/sage_maker_kernel/kernelmagics.py
5 1 1
def _process_latest()
in sage_maker_magic/sage_maker_kernel/kernelmagics.py
5 2 2
def _full_fill_args()
in sage_maker_magic/sage_maker_kernel/kernelmagics.py
5 1 1
def tfjob()
in sage_maker_magic/sage_maker_kernel/kernelmagics.py
5 1 4
def load_ipython_extension()
in sage_maker_magic/sage_maker_kernel/kernelmagics.py
5 1 1
def _is_root()
in sage_maker_magic/sage_maker_kernel/install.py
5 2 0
def _execute_cell_for_user()
in sage_maker_magic/sage_maker_kernel/kernel.py
5 2 6
def _load_magics_extension()
in sage_maker_magic/sage_maker_kernel/kernel.py
5 1 1