freertos / FreeRTOS
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 605 units with 15,258 lines of code in units (64.3% of code).
    • 11 very long units (1,582 lines of code)
    • 51 long units (3,485 lines of code)
    • 214 medium size units (6,912 lines of code)
    • 145 small units (2,259 lines of code)
    • 184 very small units (1,020 lines of code)
10% | 22% | 45% | 14% | 6%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c10% | 23% | 45% | 14% | 5%
py0% | 0% | 49% | 7% | 42%
js0% | 0% | 0% | 50% | 50%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
FreeRTOS-Plus/Source/Reliance-Edge12% | 27% | 43% | 14% | 2%
FreeRTOS-Plus/Source/Application-Protocols17% | 29% | 46% | 5% | <1%
FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace3% | 13% | 46% | 21% | 14%
tools/aws_config_quick_start0% | 0% | 49% | 7% | 42%
FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI0% | 0% | 100% | 0% | 0%
FreeRTOS-Plus/Source/Utilities0% | 0% | 52% | 13% | 33%
tools/aws_config_offline/js0% | 0% | 0% | 50% | 50%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
uint32_t RedCrc32Update()
in FreeRTOS-Plus/Source/Reliance-Edge/util/crc.c
318 6 3
static TlsTransportStatus_t tlsSetup()
in FreeRTOS-Plus/Source/Application-Protocols/network_transport/using_mbedtls_pkcs11/using_mbedtls_pkcs11.c
173 23 3
static REDSTATUS FildesOpen()
in FreeRTOS-Plus/Source/Reliance-Edge/posix/posix.c
142 32 4
REDSTATUS RedCoreInit()
in FreeRTOS-Plus/Source/Reliance-Edge/core/driver/core.c
137 22 1
REDSTATUS RedVolFormat()
in FreeRTOS-Plus/Source/Reliance-Edge/core/driver/format.c
132 22 1
BaseType_t Sockets_Connect()
in FreeRTOS-Plus/Source/Application-Protocols/network_transport/sockets_wrapper/cellular/sockets_wrapper.c
132 21 5
static uint8_t prvTraceUserEventFormat()
in FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcSnapshotRecorder.c
127 27 4
REDSTATUS RedDirEntryRename()
in FreeRTOS-Plus/Source/Reliance-Edge/core/driver/dir.c
110 30 6
REDSTATUS RedDirEntryLookup()
in FreeRTOS-Plus/Source/Reliance-Edge/core/driver/dir.c
105 24 4
REDSTATUS RedBufferGet()
in FreeRTOS-Plus/Source/Reliance-Edge/core/driver/buffer.c
105 22 3
static CK_RV initializeClientKeys()
in FreeRTOS-Plus/Source/Application-Protocols/network_transport/using_mbedtls_pkcs11/using_mbedtls_pkcs11.c
101 16 2
REDSTATUS RedInodeDataWrite()
in FreeRTOS-Plus/Source/Reliance-Edge/core/driver/inodedata.c
96 26 4
static void SeekCoord()
in FreeRTOS-Plus/Source/Reliance-Edge/core/driver/inodedata.c
95 13 2
REDSTATUS RedInodeCreate()
in FreeRTOS-Plus/Source/Reliance-Edge/core/driver/inode.c
93 15 3
static REDSTATUS BranchBlock()
in FreeRTOS-Plus/Source/Reliance-Edge/core/driver/inodedata.c
90 19 3
void prvTraceInitTraceData()
in FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcSnapshotRecorder.c
89 6 0
REDSTATUS RedInodeMount()
in FreeRTOS-Plus/Source/Reliance-Edge/core/driver/inode.c
86 15 3
static REDSTATUS BranchBlockCost()
in FreeRTOS-Plus/Source/Reliance-Edge/core/driver/inodedata.c
84 21 3
REDSTATUS RedVolMountMetaroot()
in FreeRTOS-Plus/Source/Reliance-Edge/core/driver/volume.c
83 17 1
static REDSTATUS BranchOneBlock()
in FreeRTOS-Plus/Source/Reliance-Edge/core/driver/inodedata.c
79 15 3