awslabs / s2n-bignum
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 12 units with 571 lines of code in units (0.2% of code).
    • 2 very long units (478 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (46 lines of code)
    • 0 small units (0 lines of code)
    • 9 very small units (47 lines of code)
83% | 0% | 8% | 0% | 8%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c83% | 0% | 8% | 0% | 8%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
benchmarks83% | 0% | 8% | 0% | 8%
Alternative Visuals
Longest Units
Top 12 longest units
Unit# linesMcCabe index# params
int main()
in benchmarks/benchmark.c
249 2 1
void call_bignum_add__4_4()
in benchmarks/benchmark.c
229 3 1
void timingtest()
in benchmarks/benchmark.c
46 5 3
uint64_t random64d()
in benchmarks/benchmark.c
9 2 1
int cpuid_extendedfeatures()
in benchmarks/benchmark.c
7 1 1
void call_bignum_mux16__6()
in benchmarks/benchmark.c
6 3 0
void call_bignum_mux16__32()
in benchmarks/benchmark.c
6 3 0
uint64_t random64()
in benchmarks/benchmark.c
4 1 1
void random_bignumd()
in benchmarks/benchmark.c
4 2 3
void random_bignum()
in benchmarks/benchmark.c
4 1 2
int full_isa_support()
in benchmarks/benchmark.c
4 2 1
int full_isa_support()
in benchmarks/benchmark.c
3 1 1