microsoft / MSRSec
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 28 units with 492 lines of code in units (6.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 9 medium size units (319 lines of code)
    • 7 small units (101 lines of code)
    • 12 very small units (72 lines of code)
0% | 0% | 64% | 20% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 0% | 64% | 20% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
TAs/optee_ta/fTPM0% | 0% | 76% | 14% | 9%
TAs/optee_ta/AuthVars0% | 0% | 79% | 16% | 4%
TAs/optee_ta/AuthVars/src/wolf0% | 0% | 0% | 38% | 61%
TAs/optee_ta/fTPM/reference0% | 0% | 0% | 38% | 61%
TAs/optee_ta/AuthVars/src/ossl0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
static TEE_Result fTPM_Submit_Command()
in TAs/optee_ta/fTPM/fTPM.c
50 9 2
static TEE_Result fTPM_Emulate_PPI()
in TAs/optee_ta/fTPM/fTPM.c
49 8 2
TEE_Result TA_CreateEntryPoint()
in TAs/optee_ta/fTPM/fTPM.c
47 7 1
TEE_Result TA_InvokeCommandEntryPoint()
in TAs/optee_ta/AuthVars/AuthVars.c
37 8 4
static TEE_Result AuthVarGet()
in TAs/optee_ta/AuthVars/AuthVars.c
30 2 2
static TEE_Result AuthVarGetNext()
in TAs/optee_ta/AuthVars/AuthVars.c
29 2 2
static TEE_Result AuthVarQuery()
in TAs/optee_ta/AuthVars/AuthVars.c
29 2 2
static TEE_Result AuthVarSet()
in TAs/optee_ta/AuthVars/AuthVars.c
27 2 2
TEE_Result TA_InvokeCommandEntryPoint()
in TAs/optee_ta/fTPM/fTPM.c
21 3 4
TEE_Result TA_CreateEntryPoint()
in TAs/optee_ta/AuthVars/AuthVars.c
18 3 1
static uint32_t fTPMResponseCode()
in TAs/optee_ta/fTPM/fTPM.c
18 2 2
TEE_Result TA_OpenSessionEntryPoint()
in TAs/optee_ta/AuthVars/AuthVars.c
13 2 3
int strncasecmp()
in TAs/optee_ta/AuthVars/src/ossl/RuntimeSupport.c
13 5 3
int strncasecmp()
in TAs/optee_ta/AuthVars/src/wolf/RuntimeSupport.c
13 5 3
TEE_Result TA_OpenSessionEntryPoint()
in TAs/optee_ta/fTPM/fTPM.c
13 2 3
int strncasecmp()
in TAs/optee_ta/fTPM/reference/RuntimeSupport.c
13 5 3
int tolower()
in TAs/optee_ta/AuthVars/src/wolf/RuntimeSupport.c
8 3 1
int toupper()
in TAs/optee_ta/AuthVars/src/wolf/RuntimeSupport.c
8 3 1
static uint32_t SwapBytes32()
in TAs/optee_ta/fTPM/fTPM.c
8 1 1
int tolower()
in TAs/optee_ta/fTPM/reference/RuntimeSupport.c
8 3 1