microsoft / vscode-tools-for-ai
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 80 lines of code in units (41.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (25 lines of code)
    • 2 small units (26 lines of code)
    • 5 very small units (29 lines of code)
0% | 0% | 31% | 32% | 36%
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% | 31% | 32% | 36%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
mnist-vscode-docs-sample0% | 0% | 31% | 32% | 36%
Alternative Visuals
Longest Units
Top 8 longest units
Unit# linesMcCabe index# params
def prepare_data()
in mnist-vscode-docs-sample/utils.py
25 2 2
def load_data()
in mnist-vscode-docs-sample/prepare.py
13 2 2
def load_data()
in mnist-vscode-docs-sample/utils.py
13 2 2
def init()
in mnist-vscode-docs-sample/score.py
9 1 0
def get_AMLRun()
in mnist-vscode-docs-sample/amlrun.py
7 2 0
def download_data()
in mnist-vscode-docs-sample/prepare.py
6 2 2
def run()
in mnist-vscode-docs-sample/score.py
5 1 1
def one_hot_encode()
in mnist-vscode-docs-sample/utils.py
2 1 2