microsoft / uf2-samdx1
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 1,443 units with 42,722 lines of code in units (12.1% of code).
    • 96 very long units (19,874 lines of code)
    • 103 long units (7,128 lines of code)
    • 249 medium size units (8,391 lines of code)
    • 252 small units (3,654 lines of code)
    • 743 very small units (3,675 lines of code)
46% | 16% | 19% | 8% | 8%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c49% | 17% | 18% | 7% | 6%
js0% | 8% | 26% | 38% | 25%
h0% | 0% | 34% | 25% | 40%
cpp0% | 0% | 22% | 28% | 48%
py0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/cmsis49% | 16% | 19% | 7% | 7%
src13% | 24% | 27% | 16% | 17%
lib/samd210% | 0% | 25% | 11% | 62%
inc0% | 0% | 50% | 33% | 16%
scripts/clean-ifaces0% | 0% | 0% | 100% | 0%
scripts0% | 0% | 0% | 40% | 59%
lib/usb_msc0% | 0% | 0% | 0% | 100%
lib/samd510% | 0% | 0% | 0% | 100%
lib/same540% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
arm_status arm_conv_partial_fast_q15()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_conv_partial_fast_q15.c
661 61 7
void arm_conv_fast_q15()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_conv_fast_q15.c
601 47 5
void arm_correlate_fast_q15()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_correlate_fast_q15.c
555 37 5
void arm_radix4_butterfly_q15()
in lib/cmsis/CMSIS/DSP_Lib/Source/TransformFunctions/arm_cfft_radix4_q15.c
359 11 4
void arm_radix4_butterfly_inverse_q15()
in lib/cmsis/CMSIS/DSP_Lib/Source/TransformFunctions/arm_cfft_radix4_q15.c
357 11 4
void arm_biquad_cascade_stereo_df2T_f32()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_f32.c
356 9 4
arm_status arm_conv_partial_q15()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_conv_partial_q15.c
325 38 7
arm_status arm_conv_partial_q7()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_conv_partial_q7.c
312 29 7
void arm_correlate_q7()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_correlate_q7.c
308 24 5
static int32_t USART_Control()
in lib/cmsis/CMSIS/Pack/Example/CMSIS_Driver/USART_LPC18xx.c
305 104 3
void arm_radix4_butterfly_inverse_f32()
in lib/cmsis/CMSIS/DSP_Lib/Source/TransformFunctions/arm_cfft_radix4_f32.c
301 10 5
void arm_radix4_butterfly_inverse_q31()
in lib/cmsis/CMSIS/DSP_Lib/Source/TransformFunctions/arm_cfft_radix4_q31.c
293 10 4
void arm_radix4_butterfly_q31()
in lib/cmsis/CMSIS/DSP_Lib/Source/TransformFunctions/arm_cfft_radix4_q31.c
291 10 4
void arm_conv_q15()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_conv_q15.c
284 30 5
void arm_biquad_cascade_df2T_f32()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_biquad_cascade_df2T_f32.c
280 9 4
void arm_biquad_cascade_df2T_f64()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_biquad_cascade_df2T_f64.c
280 9 4
void arm_correlate_q15()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_correlate_q15.c
276 28 5
void arm_conv_q7()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_conv_q7.c
272 21 5
void arm_fir_f32()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_fir_f32.c
268 8 4
extern void arm_bitreversal_f32()
in lib/cmsis/CMSIS/DSP_Lib/Source/TransformFunctions/arm_cfft_radix4_f32.c
268 9 4