microsoft / Network-Adapter-Class-Extension
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 232 units with 1,730 lines of code in units (3.6% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (159 lines of code)
    • 12 medium size units (363 lines of code)
    • 23 small units (295 lines of code)
    • 195 very small units (913 lines of code)
0% | 9% | 20% | 17% | 52%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
h0% | 6% | 19% | 20% | 53%
cpp0% | 23% | 36% | 8% | 31%
hpp0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
rtl/inc0% | 6% | 19% | 21% | 52%
netcx/adapter0% | 43% | 20% | 15% | 20%
netcx/ec/lib0% | 0% | 55% | 0% | 45%
netcx/bm0% | 0% | 100% | 0% | 0%
netcx/translator0% | 0% | 0% | 0% | 100%
netcx/adapter/powerpolicy0% | 0% | 0% | 0% | 100%
netcx/adapter/types0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
86 17 4
void NxAdapter::ReportWakeReasonPacket()
in netcx/adapter/nxadapter.cpp
73 6 1
PAGED void moveElements()
in rtl/inc/karray.h
49 11 3
45 6 3
void NxAdapter::ReportWakeReasonMediaChange()
in netcx/adapter/nxadapter.cpp
35 3 1
void TimeBudgetWarningLogger::LogWarningIfOvertime()
in netcx/ec/lib/timebudgetwarninglogger.cpp
32 7 1
PAGED bool reserve()
in rtl/inc/karray.h
31 9 1
PAGED bool insertAt()
in rtl/inc/karray.h
31 8 3
PAGED bool resize()
in rtl/inc/karray.h
28 7 1
static SetNameForHistogram()
in netcx/ec/lib/executioncontext.cpp
23 2 4
23 4 2
23 5 3
22 4 2
RtlMdl::operator new()
in netcx/bm/mdl.cpp
21 2 3
NONPAGED void AddValue()
in rtl/inc/khistogram.h
18 4 1
NONPAGED void IncrementBucket()
in rtl/inc/khistogram.h
18 2 1
NONPAGED void reset()
in rtl/inc/karray.h
17 4 0
case MAKEVER()
in netcx/adapter/version.cpp
14 4 2
14 4 2
14 5 2