microsoft / sqlmlutils
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 172 units with 2,995 lines of code in units (88.3% of code).
    • 4 very long units (730 lines of code)
    • 6 long units (402 lines of code)
    • 30 medium size units (1,002 lines of code)
    • 29 small units (428 lines of code)
    • 103 very small units (433 lines of code)
24% | 13% | 33% | 14% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
R32% | 17% | 36% | 10% | 3%
py0% | 0% | 23% | 26% | 49%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
R/R32% | 17% | 36% | 10% | 3%
Python/sqlmlutils0% | 0% | 40% | 15% | 44%
Python/sqlmlutils/packagemanagement0% | 0% | 0% | 43% | 56%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
245 37 9
206 28 6
158 26 7
121 18 5
82 12 6
79 12 8
execute <- function()
in R/R/executeInSQL.R
77 14 3
handleTailParams <- function()
in R/R/storedProcedureScripting.R
59 8 2
53 3 5
52 6 5
sqlEnumTable <- function()
in R/R/sqlPackage.R
50 6 5
49 10 4
45 7 5
def script_parameter_text()
in Python/sqlmlutils/sqlbuilder.py
43 14 5
def __init__()
in Python/sqlmlutils/sqlbuilder.py
43 16 6
42 8 8
def execute_query()
in Python/sqlmlutils/sqlqueryexecutor.py
41 16 4
39 6 6
38 4 3
37 5 6