microsoft / mu
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 38 units with 421 lines of code in units (63.1% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (51 lines of code)
    • 3 medium size units (87 lines of code)
    • 10 small units (138 lines of code)
    • 24 very small units (145 lines of code)
0% | 12% | 20% | 32% | 34%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 12% | 20% | 32% | 34%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 12% | 20% | 32% | 34%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def __init__()
in DocBuild.py
51 16 4
def main()
in DocBuild.py
34 7 0
def main()
in Utf8Test.py
30 9 0
def ProcessRootDir()
in DocBuild.py
23 10 1
def Clean()
in DocBuild.py
16 7 1
def GatherArguments()
in DocBuild.py
16 1 0
def MakeFriendly()
in DocBuild.py
15 4 2
def MakeYml()
in DocBuild.py
15 4 1
def MakeNav()
in DocBuild.py
15 4 1
def GetNavYml()
in DocBuild.py
13 6 3
def Collapse()
in DocBuild.py
13 6 1
def AddToTree()
in DocBuild.py
12 6 3
def MakeRepoInfo()
in DocBuild.py
12 4 1
11 1 2
10 3 3
9 1 2
def _ProcessGitRepo()
in DocBuild.py
9 1 2
def _MakeNavTree()
in DocBuild.py
9 2 1
9 2 3
def __str__()
in DocBuild.py
8 3 1