microsoft / bonsai-cli
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 212 units with 1,608 lines of code in units (20.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (197 lines of code)
    • 31 small units (434 lines of code)
    • 175 very small units (977 lines of code)
0% | 0% | 12% | 26% | 60%
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% | 12% | 26% | 60%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
bonsaicli2/bonsai_cli0% | 0% | 17% | 22% | 59%
bonsaicli2/bonsai_cli/commands0% | 0% | 0% | 36% | 63%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def check_cli_version()
in bonsaicli2/bonsai_cli/utils.py
50 9 3
def _parse_args()
in bonsaicli2/bonsai_cli/config.py
43 14 2
def _handle_and_raise()
in bonsaicli2/bonsai_cli/api.py
33 3 3
def __init__()
in bonsaicli2/bonsai_cli/aad.py
26 7 2
def _parse_config()
in bonsaicli2/bonsai_cli/config.py
24 9 2
def create_sim_collection()
in bonsaicli2/bonsai_cli/api.py
21 1 0
def _dict()
in bonsaicli2/bonsai_cli/api.py
20 8 2
def start_assessment()
in bonsaicli2/bonsai_cli/commands/assessment.py
18 1 0
def _get_version_result()
in bonsaicli2/bonsai_cli/utils.py
18 6 2
def __init__()
in bonsaicli2/bonsai_cli/cookies.py
17 4 2
def list_profiles()
in bonsaicli2/bonsai_cli/utils.py
17 6 1
def get_access_token()
in bonsaicli2/bonsai_cli/aad.py
16 6 1
def create_sim_package()
in bonsaicli2/bonsai_cli/api.py
16 1 0
def update()
in bonsaicli2/bonsai_cli/config.py
16 8 2
def _parse_config()
in bonsaicli2/bonsai_cli/cookies.py
16 6 1
def start_assessmentv2()
in bonsaicli2/bonsai_cli/api.py
14 1 0
def create_exportedbrain()
in bonsaicli2/bonsai_cli/commands/exportedbrain.py
14 1 0
def create_container_simulator_package()
in bonsaicli2/bonsai_cli/commands/simulator_package_container.py
14 1 0
def create_modelfile_simulator_package()
in bonsaicli2/bonsai_cli/commands/simulator_package_modelfile.py
14 1 0
def print_profile_information()
in bonsaicli2/bonsai_cli/utils.py
14 4 1