microsoft / BlingFire
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 2,259 units with 43,351 lines of code in units (27.1% of code).
    • 40 very long units (5,313 lines of code)
    • 136 long units (9,088 lines of code)
    • 506 medium size units (16,083 lines of code)
    • 463 small units (6,866 lines of code)
    • 1,114 very small units (6,001 lines of code)
12% | 20% | 37% | 15% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp13% | 23% | 35% | 14% | 13%
h5% | 5% | 51% | 23% | 14%
cxx77% | 0% | 0% | 9% | 13%
py0% | 0% | 42% | 23% | 33%
cs0% | 0% | 58% | 30% | 10%
js0% | 0% | 24% | 72% | 3%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
blingfiretools28% | 34% | 29% | 6% | 1%
blingfirecompile.library4% | 17% | 39% | 19% | 19%
blingfireclient.library15% | 14% | 40% | 16% | 13%
ldbsrc0% | 0% | 47% | 21% | 30%
nuget0% | 0% | 58% | 30% | 10%
scripts0% | 0% | 40% | 34% | 25%
dist-pypi0% | 0% | 22% | 0% | 77%
wasm0% | 0% | 24% | 72% | 3%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
int FARegexpParser_msyacc::Parse()
in blingfirecompile.library/src/FARegexpParser_msyacc.cpp
290 49 0
void SetupConfParams()
in blingfiretools/fa_build_conf/fa_build_conf.cpp
187 1 0
cxx
int YYPARSER::Parse()
in blingfirecompile.library/ext/yypars.cxx
175 34 0
int __cdecl main()
in blingfiretools/fa_line2chain_unicode/fa_line2chain_unicode.cpp
168 44 2
int __cdecl main()
in blingfiretools/fa_lex/fa_lex.cpp
164 32 2
const int FARSDfa_pack_triv::GetDest()
in blingfireclient.library/src/FARSDfa_pack_triv.cpp
162 32 2
void FAWbdConfKeeper::Initialize()
in blingfireclient.library/src/FAWbdConfKeeper.cpp
157 30 3
int __cdecl main()
in blingfiretools/fa_ts2ps/fa_ts2ps.cpp
156 28 2
int __cdecl main()
in blingfiretools/fa_pats_select/fa_pats_select.cpp
148 20 2
int __cdecl main()
in blingfiretools/fa_wrec/fa_wrec.cpp
145 34 2
int __cdecl main()
in blingfiretools/fa_align/fa_align.cpp
144 31 2
const int TextToIdsWithOffsets_wp()
in blingfiretools/blingfiretokdll/blingfiretokdll.cpp
142 43 8
int __cdecl main()
in blingfiretools/fa_fsm2fsm/fa_fsm2fsm.cpp
140 33 2
void FADictConfKeeper::Init()
in blingfireclient.library/src/FADictConfKeeper.cpp
139 32 2
void process_args()
in blingfiretools/fa_line2chain_unicode/fa_line2chain_unicode.cpp
137 34 2
const int TextToSentencesWithOffsetsWithModel()
in blingfiretools/blingfiretokdll/blingfiretokdll.cpp
136 39 7
void process_args()
in blingfiretools/fa_ts2stat/fa_ts2stat.cpp
135 31 2
int __cdecl main()
in blingfiretools/fa_iwowsuff2pats/fa_iwowsuff2pats.cpp
132 25 2
int __cdecl main()
in blingfiretools/fa_fsm2fsm_iwec/fa_fsm2fsm_iwec.cpp
129 26 2
const int TextToIdsWithOffsets_sp()
in blingfiretools/blingfiretokdll/blingfiretokdll.cpp
127 38 8