microsoft / protool
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 18 units with 292 lines of code in units (61.3% of code).
    • 1 very long units (121 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (24 lines of code)
    • 6 small units (90 lines of code)
    • 10 very small units (57 lines of code)
41% | 0% | 8% | 30% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py41% | 0% | 8% | 30% | 19%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
protool43% | 0% | 8% | 27% | 20%
ROOT0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 18 longest units
Unit# linesMcCabe index# params
def _handle_arguments()
in protool/command_line.py
121 6 0
def _handle_read()
in protool/command_line.py
24 6 1
def _handle_diff()
in protool/command_line.py
18 3 1
def _parse_contents()
in protool/__init__.py
17 1 1
def profiles()
in protool/__init__.py
16 4 1
def _handle_git_diff()
in protool/command_line.py
15 2 1
def inline()
in inlinecss.py
13 5 1
def developer_certificates()
in protool/__init__.py
11 2 1
def profile_type()
in protool/__init__.py
10 8 1
def _get_xml()
in protool/__init__.py
7 2 1
def diff()
in protool/__init__.py
7 1 0
def value_for_key()
in protool/__init__.py
7 2 2
def _handle_decode()
in protool/command_line.py
7 2 1
def load_from_disk()
in protool/__init__.py
6 2 3
def decode()
in protool/__init__.py
5 2 2
def __init__()
in protool/__init__.py
4 1 4
def contents()
in protool/__init__.py
2 1 1
def run()
in protool/command_line.py
2 1 0