apple / darwin-libpthread
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 33 units with 389 lines of code in units (3.1% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (65 lines of code)
    • 3 medium size units (78 lines of code)
    • 10 small units (143 lines of code)
    • 19 very small units (103 lines of code)
0% | 16% | 20% | 36% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 31% | 10% | 28% | 30%
c0% | 0% | 50% | 21% | 28%
lua0% | 0% | 21% | 59% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lldbmacros0% | 31% | 10% | 28% | 30%
src0% | 0% | 58% | 25% | 16%
tools0% | 0% | 21% | 59% | 18%
kern0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def GetKwqSummary()
in lldbmacros/init.py
65 1 1
32 2 6
lua
get_prefix = function()
in tools/pthtrace.lua
25 6 1
21 1 1
def GetUserMutexSummary()
in lldbmacros/init.py
18 1 2
lua
get_prefix = function()
in tools/locktrace.lua
18 4 1
lua
decode_lval = function()
in tools/locktrace.lua
16 4 1
def GetLSeqBits()
in lldbmacros/init.py
15 1 1
def PthreadCurrentMutex()
in lldbmacros/init.py
14 2 1
14 1 4
def GetKweSummary()
in lldbmacros/init.py
13 1 1
lua
decode_sval = function()
in tools/locktrace.lua
12 3 1
lua
decode_cv_sval = function()
in tools/locktrace.lua
12 3 1
lua
get_kwq_type = function()
in tools/locktrace.lua
11 4 1
def GetSSeqBits()
in lldbmacros/init.py
9 1 1
def ShowPthreadWorkqueue()
in lldbmacros/init.py
9 1 1
9 1 3
def GetPthreadSummary()
in lldbmacros/init.py
8 1 1
lua
trace_codename = function()
in tools/locktrace.lua
8 2 2
lua
trace_codename = function()
in tools/pthtrace.lua
8 2 2