apple / cups
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 112 units with 12,356 lines of code in units (3.9% of code).
    • 31 very long units (10,253 lines of code)
    • 12 long units (868 lines of code)
    • 27 medium size units (903 lines of code)
    • 15 small units (224 lines of code)
    • 27 very small units (108 lines of code)
82% | 7% | 7% | 1% | <1%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c83% | 7% | 7% | 1% | <1%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
backend74% | 11% | 10% | 2% | <1%
systemv100% | 0% | 0% | 0% | 0%
scheduler83% | 0% | 12% | 2% | <1%
cups78% | 10% | 7% | 3% | <1%
tools100% | 0% | 0% | 0% | 0%
notifier100% | 0% | 0% | 0% | 0%
berkeley100% | 0% | 0% | 0% | 0%
filter92% | 0% | 0% | 7% | 0%
cgi-bin34% | 48% | 16% | 0% | 0%
vcnet0% | 64% | 0% | 0% | 35%
locale0% | 0% | 100% | 0% | 0%
ppdc0% | 0% | 0% | 0% | 100%
xcode0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
static void cancel_job()
in backend/ipp.c
1447 405 6
static int check_constraints()
in systemv/cupstestppd.c
1249 386 4
1005 208 9
533 107 3
static int add_file()
in scheduler/ipp.c
461 124 4
static void walk_cb()
in backend/testbackend.c
410 74 4
static void check_dest()
in systemv/lpstat.c
394 92 4
static void add_printer_filter()
in scheduler/cupsfilter.c
366 76 4
337 40 9
288 121 4
static int lpd_command()
in backend/lpd.c
286 80 3
271 51 3
static int setpagedevice()
in cups/raster-interpret.c
266 69 3
static int check_if_modified()
in scheduler/client.c
223 37 2
static int save_rss()
in notifier/rss.c
216 38 3
static void device_cb()
in systemv/lpinfo.c
201 42 7
static int show_jobs()
in berkeley/lpq.c
200 40 6
198 80 3
static void utf16_to_utf8()
in backend/snmp-supplies.c
179 64 5
178 42 10