microsoft / DroneRescue
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 8 units with 205 lines of code in units (78.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (55 lines of code)
    • 3 medium size units (119 lines of code)
    • 1 small units (16 lines of code)
    • 3 very small units (15 lines of code)
0% | 26% | 58% | 7% | 7%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 26% | 58% | 7% | 7%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
resources0% | 26% | 58% | 7% | 7%
Alternative Visuals
Longest Units
Top 8 longest units
Unit# linesMcCabe index# params
def start()
in resources/drone_orbit.py
55 8 1
def __init__()
in resources/drone_orbit.py
47 8 10
def track_orbits()
in resources/drone_orbit.py
42 23 2
def OrbitAnimal()
in resources/search_sample.py
30 2 7
def take_snapshot()
in resources/drone_orbit.py
16 2 1
def land()
in resources/search_sample.py
7 1 0
def __init__()
in resources/drone_orbit.py
4 1 2
def sign()
in resources/drone_orbit.py
4 2 2