aws / aws-nitro-enclaves-sdk-bootstrap
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 29 units with 586 lines of code in units (72.1% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (182 lines of code)
    • 6 medium size units (191 lines of code)
    • 7 small units (119 lines of code)
    • 13 very small units (94 lines of code)
0% | 31% | 32% | 20% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 31% | 32% | 20% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
nsm-driver0% | 47% | 22% | 12% | 17%
init0% | 0% | 51% | 34% | 14%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
67 18 1
static int nsm_rng_read()
in nsm-driver/nsm.c
62 12 4
53 15 3
void init_fs()
in init/init.c
43 13 2
void init_cgroups()
in init/init.c
37 12 0
33 4 1
31 11 2
int main()
in init/init.c
25 1 0
static long nsm_dev_ioctl()
in nsm-driver/nsm.c
22 4 3
pid_t launch()
in init/init.c
19 4 2
void enclave_ready()
in init/init.c
19 1 0
19 5 1
int reap_until()
in init/init.c
17 5 1
17 6 2
15 4 0
13 3 1
10 2 1
void init_console()
in init/init.c
9 1 0
void init_dev()
in init/init.c
8 3 0
static void message_delete()
in nsm-driver/nsm.c
8 2 1