microsoft / vscode-azurecli
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 101 units with 1,057 lines of code in units (76.9% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (102 lines of code)
    • 9 medium size units (300 lines of code)
    • 21 small units (290 lines of code)
    • 69 very small units (365 lines of code)
0% | 9% | 28% | 27% | 34%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 9% | 36% | 25% | 28%
py0% | 9% | 20% | 29% | 40%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 9% | 36% | 25% | 28%
service/azservice0% | 9% | 20% | 29% | 40%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in service/azservice/__main__.py
51 18 0
export function parse()
in src/parser.ts
51 14 1
def get_group_index()
in service/azservice/__main__.py
50 16 1
private getSelectedCommand()
in src/extension.ts
46 10 1
def get_hover_text()
in service/azservice/__main__.py
39 33 3
private spawn()
in src/azService.ts
35 5 2
private run()
in src/extension.ts
35 5 1
private async getProcess()
in src/azService.ts
28 10 0
private async send()
in src/azService.ts
23 4 2
23 6 0
def get_configured_defaults()
in service/azservice/tooling2.py
21 8 0
def _install_modules()
in service/azservice/tooling1.py
19 7 1
def get_argument_value_list()
in service/azservice/__main__.py
18 13 3
private getArguments()
in src/extension.ts
18 5 1
def get_argument_name_completions()
in service/azservice/__main__.py
17 12 2
def get_snippets()
in service/azservice/__main__.py
16 3 1
private change()
in src/extension.ts
16 6 1
private updateResult()
in src/extension.ts
15 9 0
def add_command_documentation()
in service/azservice/__main__.py
13 6 2
def get_completions()
in service/azservice/__main__.py
13 6 5