microsoft / pgtoolsservice
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 1,761 units with 9,567 lines of code in units (66.0% of code).
    • 1 very long units (154 lines of code)
    • 5 long units (338 lines of code)
    • 62 medium size units (1,816 lines of code)
    • 150 small units (2,192 lines of code)
    • 1,543 very small units (5,067 lines of code)
1% | 3% | 18% | 22% | 52%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py1% | 3% | 18% | 22% | 52%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ossdbtoolsservice/language6% | 12% | 25% | 19% | 35%
pgsmo/objects0% | 3% | 16% | 25% | 54%
ossdbtoolsservice/query0% | 0% | 23% | 17% | 59%
ossdbtoolsservice/object_explorer0% | 0% | 22% | 13% | 63%
ossdbtoolsservice/disaster_recovery0% | 0% | 59% | 24% | 15%
ossdbtoolsservice/hosting0% | 0% | 25% | 38% | 36%
smo/utils0% | 0% | 47% | 29% | 23%
ossdbtoolsservice/driver0% | 0% | 21% | 21% | 56%
ossdbtoolsservice/query_execution0% | 0% | 16% | 36% | 47%
ossdbtoolsservice/edit_data0% | 0% | 9% | 32% | 58%
ossdbtoolsservice/connection0% | 0% | 12% | 23% | 63%
ossdbtoolsservice/serialization0% | 0% | 75% | 0% | 25%
ossdbtoolsservice/capabilities0% | 0% | 22% | 23% | 53%
ossdbtoolsservice/workspace0% | 0% | 0% | 23% | 76%
mysqlsmo/objects0% | 0% | 0% | 14% | 85%
ossdbtoolsservice/tasks0% | 0% | 0% | 31% | 68%
ossdbtoolsservice/scripting0% | 0% | 0% | 48% | 51%
smo/common0% | 0% | 0% | 11% | 88%
ossdbtoolsservice0% | 0% | 0% | 100% | 0%
ossdbtoolsservice/metadata0% | 0% | 0% | 26% | 73%
ossdbtoolsservice/utils0% | 0% | 0% | 19% | 80%
ossdbtoolsservice/admin0% | 0% | 0% | 40% | 59%
ossdbtoolsservice/converters0% | 0% | 0% | 0% | 100%
ossdbtoolsservice/parsers0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def suggest_based_on_last_token()
in ossdbtoolsservice/language/completion/packages/sqlcompletion.py
154 52 2
def functions()
in ossdbtoolsservice/language/query/pg_lightweight_metadata.py
78 5 1
def get_full_type()
in pgsmo/objects/table_objects/column.py
71 3 6
def find_matches()
in ossdbtoolsservice/language/completion/completer.py
70 7 5
def _columns()
in ossdbtoolsservice/language/query/pg_lightweight_metadata.py
66 4 4
def get_column_matches()
in ossdbtoolsservice/language/completion/pgcompleter.py
53 32 3
def _dispatch_message()
in ossdbtoolsservice/hosting/json_rpc_server.py
48 14 2
def casing()
in ossdbtoolsservice/language/query/pg_lightweight_metadata.py
47 2 1
def extract_table_identifiers()
in ossdbtoolsservice/language/completion/packages/parseutils/tables.py
42 22 2
def get_join_condition_matches()
in ossdbtoolsservice/language/completion/pgcompleter.py
42 26 3
def datatypes()
in ossdbtoolsservice/language/query/pg_lightweight_metadata.py
42 3 1
def get_foreign_keys()
in pgsmo/objects/table_objects/constraints_utils.py
42 5 3
def __init__()
in ossdbtoolsservice/language/completion/pgcompleter.py
39 4 4
def _update_query_data()
in pgsmo/objects/functions/function_base.py
39 1 1
def needs_quoting()
in smo/utils/templating.py
38 21 2
def get_join_matches()
in ossdbtoolsservice/language/completion/pgcompleter.py
37 24 3
def __init__()
in ossdbtoolsservice/disaster_recovery/contracts/backup.py
36 1 1
def __init__()
in ossdbtoolsservice/driver/types/pymysql_driver.py
36 24 3
def foreignkeys()
in ossdbtoolsservice/language/query/pg_lightweight_metadata.py
36 3 1
def _update_query_data()
in pgsmo/objects/table_objects/trigger.py
36 1 1