microsoft / ms-tpm-20-ref
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 21 units with 492 lines of code in units (0.8% of code).
    • 1 very long units (147 lines of code)
    • 1 long units (100 lines of code)
    • 1 medium size units (22 lines of code)
    • 10 small units (155 lines of code)
    • 8 very small units (68 lines of code)
29% | 20% | 4% | 31% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c29% | 20% | 4% | 31% | 13%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tpm/src/support53% | 0% | 8% | 38% | 0%
tpm/src/crypt0% | 47% | 0% | 24% | 28%
Simulator/src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
UINT16 Marshal()
in TPMCmd/tpm/src/support/TableDrivenMarshal.c
147 25 4
int GetCachedRsaKey()
in TPMCmd/tpm/src/crypt/CryptRsa.c
100 25 3
static TPM_RC ArrayUnmarshal()
in TPMCmd/tpm/src/support/TableDrivenMarshal.c
22 4 5
static UINT16 ArrayMarshal()
in TPMCmd/tpm/src/support/TableDrivenMarshal.c
20 3 5
int TDES_setup()
in TPMCmd/tpm/src/crypt/wolf/TpmToWolfDesSupport.c
19 2 4
void TDES_setup()
in TPMCmd/tpm/src/crypt/ltc/TpmToLtcDesSupport.c
18 2 3
static UINT32 GetUnmarshaledInteger()
in TPMCmd/tpm/src/support/TableDrivenMarshal.c
18 5 2
static UINT16 MarshalBytes()
in TPMCmd/tpm/src/support/TableDrivenMarshal.c
16 4 4
static TPM_RC UnmarshalBytes()
in TPMCmd/tpm/src/support/TableDrivenMarshal.c
15 2 4
const BN_STRUCT()
in TPMCmd/tpm/src/crypt/PrimeData.c
14 1 1
static BOOL Unmarshal32()
in TPMCmd/tpm/src/support/TpmFail.c
12 2 3
static BOOL Unmarshal16()
in TPMCmd/tpm/src/support/TpmFail.c
12 2 3
static UINT32 GetSelector()
in TPMCmd/tpm/src/support/TableDrivenMarshal.c
11 1 3
void TDES_encrypt()
in TPMCmd/tpm/src/crypt/ossl/TpmToOsslDesSupport.c
10 1 3
void TDES_decrypt()
in TPMCmd/tpm/src/crypt/ossl/TpmToOsslDesSupport.c
10 1 3
uint32_t LtcRand()
in TPMCmd/tpm/src/crypt/ltc/TpmToLtcSupport.c
9 1 2
int TDES_setup_encrypt_key()
in TPMCmd/tpm/src/crypt/wolf/TpmToWolfDesSupport.c
8 1 3
int TDES_setup_decrypt_key()
in TPMCmd/tpm/src/crypt/wolf/TpmToWolfDesSupport.c
8 1 3
void TDES_encrypt()
in TPMCmd/tpm/src/crypt/wolf/TpmToWolfDesSupport.c
8 1 3
void TDES_decrypt()
in TPMCmd/tpm/src/crypt/wolf/TpmToWolfDesSupport.c
8 1 3