freertos / coreSNTP
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 23 units with 770 lines of code in units (66.8% of code).
    • 0 very long units (0 lines of code)
    • 5 long units (301 lines of code)
    • 11 medium size units (410 lines of code)
    • 1 small units (17 lines of code)
    • 6 very small units (42 lines of code)
0% | 39% | 53% | 2% | 5%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 39% | 53% | 2% | 5%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source0% | 39% | 53% | 2% | 5%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
66 13 2
SntpStatus_t Sntp_Init()
in source/core_sntp_client.c
64 16 11
static SntpStatus_t sendSntpPacket()
in source/core_sntp_client.c
62 6 7
static SntpStatus_t parseValidSntpResponse()
in source/core_sntp_serializer.c
57 5 4
SntpStatus_t Sntp_SendTimeRequest()
in source/core_sntp_client.c
52 7 3
SntpStatus_t Sntp_DeserializeResponse()
in source/core_sntp_serializer.c
47 13 5
SntpStatus_t Sntp_ReceiveTimeResponse()
in source/core_sntp_client.c
47 6 2
static bool decideAboutReadRetry()
in source/core_sntp_client.c
41 3 6
static SntpStatus_t receiveSntpResponse()
in source/core_sntp_client.c
40 4 5
SntpStatus_t Sntp_SerializeRequest()
in source/core_sntp_serializer.c
38 5 4
static SntpStatus_t validateContext()
in source/core_sntp_client.c
38 17 1
static int64_t safeTimeDifference()
in source/core_sntp_serializer.c
35 5 2
34 3 1
SntpStatus_t Sntp_CalculatePollInterval()
in source/core_sntp_serializer.c
31 6 3
static uint64_t calculateElapsedTimeMs()
in source/core_sntp_client.c
31 3 2
SntpStatus_t Sntp_ConvertToUnixTime()
in source/core_sntp_serializer.c
28 7 3
static void calculateClockOffset()
in source/core_sntp_serializer.c
17 1 5
static void rotateServerForNextTimeQuery()
in source/core_sntp_client.c
10 1 1
static void fillWordMemoryInNetworkOrder()
in source/core_sntp_serializer.c
9 1 2
9 1 1