microsoft / OMS-Auditd-Plugin
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 945 units with 18,557 lines of code in units (69.7% of code).
    • 27 very long units (5,625 lines of code)
    • 47 long units (3,233 lines of code)
    • 151 medium size units (4,741 lines of code)
    • 176 small units (2,581 lines of code)
    • 544 very small units (2,377 lines of code)
30% | 17% | 25% | 13% | 12%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp32% | 18% | 25% | 13% | 9%
h0% | 0% | 18% | 17% | 64%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT30% | 17% | 25% | 13% | 12%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
537 155 1
int main()
in auoms.cpp
390 75 2
static StringTable s_i386_table()
in TranslateSyscall.cpp
383 1 764
static StringTable s_arm_table()
in TranslateSyscall.cpp
363 1 724
static StringTable s_86_64_table()
in TranslateSyscall.cpp
335 1 668
int main()
in auomscollect.cpp
322 60 2
277 1 552
274 76 2
267 62 3
210 45 1
207 1 412
bool PriorityQueue::save()
in PriorityQueue.cpp
180 45 3
bool AuditRule::Parse()
in AuditRules.cpp
145 42 2
bool DoNetlinkCollection()
in auomscollect.cpp
140 31 5
139 22 3
int main()
in auomsctl.cpp
139 51 2
void diff_event()
in EventProcessorTests.cpp
135 48 3
135 1 268
int main()
in fakeaudispd.cpp
128 31 2
int Cmd::Start()
in ExecUtil.cpp
127 26 0