apple / ccs-caldavtester
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 202 units with 3,935 lines of code in units (84.7% of code).
    • 5 very long units (770 lines of code)
    • 13 long units (840 lines of code)
    • 39 medium size units (1,290 lines of code)
    • 36 small units (501 lines of code)
    • 109 very small units (534 lines of code)
19% | 21% | 32% | 12% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py19% | 21% | 32% | 12% | 13%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
verifiers34% | 42% | 21% | 1% | <1%
src16% | 15% | 33% | 15% | 19%
ROOT0% | 0% | 64% | 25% | 10%
src/observers0% | 0% | 16% | 34% | 49%
generators0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def dorequest()
in src/caldavtest.py
222 95 9
def verify()
in verifiers/multistatusItems.py
163 61 6
def verify()
in verifiers/propfindItems.py
155 60 6
def readCommandLine()
in src/manager.py
115 45 1
def verify()
in verifiers/calendarDataMatch.py
115 48 7
def verify()
in verifiers/propfindValues.py
87 43 6
def verify()
in verifiers/postFreeBusy.py
83 32 6
def dofindnew()
in src/caldavtest.py
74 32 5
def readXML()
in src/manager.py
67 35 6
def verify()
in verifiers/jsonPointerMatch.py
66 22 6
def gethttpdigestauth()
in src/request.py
63 2 3
def verify()
in verifiers/addressDataMatch.py
62 26 7
def verify()
in verifiers/freeBusy.py
61 23 6
def nodeForPath()
in src/xmlUtils.py
57 31 2
def testNode()
in verifiers/xmlElementMatch.py
57 34 4
def verify()
in verifiers/header.py
56 26 6
def matchNode()
in verifiers/xmlElementMatch.py
54 21 5
def run_test()
in src/caldavtest.py
53 23 6
def parseXML()
in src/request.py
50 21 2
def verify()
in verifiers/dataMatch.py
48 19 6