freertos / coreSNTP
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 23 units with 770 lines of code in units (66.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (215 lines of code)
    • 5 simple units (220 lines of code)
    • 14 very simple units (335 lines of code)
0% | 0% | 27% | 28% | 43%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
c0% | 0% | 27% | 28% | 43%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source0% | 0% | 27% | 28% | 43%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
static SntpStatus_t validateContext()
in source/core_sntp_client.c
38 17 1
SntpStatus_t Sntp_Init()
in source/core_sntp_client.c
64 16 11
SntpStatus_t Sntp_DeserializeResponse()
in source/core_sntp_serializer.c
47 13 5
66 13 2
SntpStatus_t Sntp_ConvertToUnixTime()
in source/core_sntp_serializer.c
28 7 3
SntpStatus_t Sntp_SendTimeRequest()
in source/core_sntp_client.c
52 7 3
SntpStatus_t Sntp_CalculatePollInterval()
in source/core_sntp_serializer.c
31 6 3
static SntpStatus_t sendSntpPacket()
in source/core_sntp_client.c
62 6 7
SntpStatus_t Sntp_ReceiveTimeResponse()
in source/core_sntp_client.c
47 6 2
static int64_t safeTimeDifference()
in source/core_sntp_serializer.c
35 5 2
static SntpStatus_t parseValidSntpResponse()
in source/core_sntp_serializer.c
57 5 4
SntpStatus_t Sntp_SerializeRequest()
in source/core_sntp_serializer.c
38 5 4
static bool isZeroTimestamp()
in source/core_sntp_serializer.c
6 4 1
static SntpStatus_t receiveSntpResponse()
in source/core_sntp_client.c
40 4 5
static uint64_t calculateElapsedTimeMs()
in source/core_sntp_client.c
31 3 2
34 3 1
static bool decideAboutReadRetry()
in source/core_sntp_client.c
41 3 6
static int64_t absoluteOf()
in source/core_sntp_serializer.c
4 2 1
static void fillWordMemoryInNetworkOrder()
in source/core_sntp_serializer.c
9 1 2
9 1 1