freertos / corePKCS11
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 72 units with 2,488 lines of code in units (49.0% of code).
    • 0 very long units (0 lines of code)
    • 21 long units (1,283 lines of code)
    • 24 medium size units (850 lines of code)
    • 19 small units (309 lines of code)
    • 8 very small units (46 lines of code)
0% | 51% | 34% | 12% | 1%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 51% | 34% | 12% | 1%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/portable/mbedtls0% | 47% | 39% | 11% | 1%
source0% | 61% | 24% | 13% | 0%
source/portable/os0% | 100% | 0% | 0% | 0%
source/portable/os/posix0% | 52% | 22% | 18% | 6%
source/portable/os/freertos_winsim0% | 36% | 39% | 16% | 7%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
static CK_RV prvSaveDerKeyToPal()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
91 15 5
static CK_RV prvEcKeyAttParse()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
74 16 3
static CK_RV prvCheckGenerateKeyPairPrivateTemplate()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
74 14 3
void PAL_UTILS_LabelToFilenameHandle()
in source/portable/os/core_pkcs11_pal_utils.c
74 12 3
static CK_RV prvCheckGenerateKeyPairPublicTemplate()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
70 14 3
static CK_RV prvRsaContextParse()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
69 10 2
CK_RV PKCS11_PAL_GetObjectValue()
in source/portable/os/freertos_winsim/core_pkcs11_pal.c
64 11 4
static CK_RV prvCertAttParse()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
62 12 5
CK_RV xGetSlotList()
in source/core_pkcs11.c
61 12 2
static CK_RV prvRsaKeyAttParse()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
58 19 3
CK_RV xInitializePkcs11Token()
in source/core_pkcs11.c
56 16 1
static CK_RV prvVerifyInitEC_RSAKeys()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
56 10 5
static CK_RV prvGetExistingKeyComponent()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
55 8 3
static CK_RV prvInitSHA256HMAC()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
54 7 4
static CK_RV prvInitAESCMAC()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
54 7 4
53 9 2
static CK_RV prvReadData()
in source/portable/os/posix/core_pkcs11_pal.c
52 7 3
CK_OBJECT_HANDLE PKCS11_PAL_SaveObject()
in source/portable/os/posix/core_pkcs11_pal.c
52 7 3
CK_RV PAL_UTILS_HandleToFilename()
in source/portable/os/core_pkcs11_pal_utils.c
52 10 3
51 6 2