aws / aws-neuron-sdk
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 99 units with 1,875 lines of code in units (69.8% of code).
    • 2 very long units (267 lines of code)
    • 4 long units (250 lines of code)
    • 20 medium size units (594 lines of code)
    • 32 small units (496 lines of code)
    • 41 very small units (268 lines of code)
14% | 13% | 31% | 26% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py14% | 13% | 31% | 26% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
_ext31% | 11% | 13% | 26% | 15%
src/helperscripts19% | 35% | 19% | 12% | 13%
src/neuron-gatherinfo0% | 0% | 50% | 35% | 14%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def run()
in _ext/sphinx_plotly_directive.py
163 33 6
def hlpr_instructions()
in src/helperscripts/neuronsetuphelper.py
104 46 2
def enumerate_release_manifest()
in src/helperscripts/neuronsetuphelper.py
70 23 2
def hlpr_build_pip_command()
in src/helperscripts/neuronsetuphelper.py
61 23 5
def run_code()
in _ext/sphinx_plotly_directive.py
60 17 5
def hlpr_os_comp_setup_cmd()
in src/helperscripts/neuronsetuphelper.py
59 23 5
def add_cmdline_args()
in src/neuron-gatherinfo/neuron-gatherinfo.py
50 1 0
def main()
in src/neuron-gatherinfo/neuron-gatherinfo.py
44 11 0
def dump_miscinfo()
in src/neuron-gatherinfo/neuron-gatherinfo.py
37 7 3
def dump_compiler_info()
in src/neuron-gatherinfo/neuron-gatherinfo.py
35 7 6
def copy_syslog()
in src/neuron-gatherinfo/neuron-gatherinfo.py
35 9 4
def sanity_check()
in src/neuron-gatherinfo/neuron-gatherinfo.py
34 14 1
def print_node_type_info()
in src/neuron-gatherinfo/tf_neuron_check_model.py
34 10 1
def print_node_type_info()
in src/neuron-gatherinfo/mx_neuron_check_model.py
34 10 1
def hlpr_print_config()
in src/helperscripts/neuronsetuphelper.py
32 9 2
def run_neuron_dump()
in src/neuron-gatherinfo/neuron-gatherinfo.py
27 6 2
def mark_plot_labels()
in _ext/sphinx_plotly_directive.py
26 9 2
def hlpr_pip_install_create_python_venv()
in src/helperscripts/neuronsetuphelper.py
26 5 1
def cli_list_cmd()
in src/helperscripts/neuronsetuphelper.py
25 11 3
def __init__()
in src/neuron-gatherinfo/tf_neuron_check_model.py
24 5 1