microsoft / TypeScript-Sublime-Plugin
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 337 units with 2,875 lines of code in units (66.6% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (120 lines of code)
    • 25 medium size units (757 lines of code)
    • 60 small units (818 lines of code)
    • 250 very small units (1,180 lines of code)
0% | 4% | 26% | 28% | 41%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 4% | 25% | 28% | 41%
js0% | 0% | 72% | 0% | 27%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
typescript/libs0% | 4% | 20% | 27% | 48%
typescript/commands0% | 7% | 27% | 38% | 26%
typescript/listeners0% | 0% | 33% | 22% | 44%
tsserver0% | 0% | 72% | 0% | 27%
ROOT0% | 0% | 58% | 26% | 15%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def queue_request()
in typescript/libs/work_scheduler.py
66 18 3
def run()
in typescript/commands/references.py
54 9 3
def show_errors()
in typescript/listeners/idle.py
49 15 3
def __init__()
in typescript/libs/node_client.py
48 10 2
def show_tooltip_popup()
in typescript/commands/quick_info.py
41 11 7
def read_msg()
in typescript/libs/node_client.py
41 14 5
def get_current_signature_parts()
in typescript/libs/popup_manager.py
36 11 1
def get_info()
in typescript/libs/view_helpers.py
35 18 2
function createCancellationToken()
in tsserver/cancellationToken.js
34 8 1
def run()
in typescript/commands/get_code_fixes.py
33 8 2
def signature_to_html()
in typescript/libs/popup_manager.py
33 10 2
31 6 0
def on_modified_with_info()
in typescript/listeners/format.py
31 17 3
def on_modified_with_info()
in typescript/listeners/listeners.py
30 12 3
def handle_completion_info()
in typescript/listeners/completion.py
28 13 2
def initialize()
in typescript/libs/editor_client.py
27 6 1
def handle_quick_info()
in typescript/commands/quick_info.py
26 10 3
def on_results()
in typescript/commands/signature.py
26 9 2
def on_query_completions()
in typescript/listeners/completion.py
26 9 4
def display()
in typescript/libs/popup_manager.py
25 6 1