freertos / coreMQTT
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 85 units with 3,582 lines of code in units (84.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 16 medium complex units (948 lines of code)
    • 35 simple units (1,589 lines of code)
    • 34 very simple units (1,045 lines of code)
0% | 0% | 26% | 44% | 29%
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% | 26% | 44% | 29%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source0% | 0% | 26% | 44% | 29%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
static bool validateTransitionPublish()
in source/core_mqtt_state.c
85 22 4
static bool validateTransitionAck()
in source/core_mqtt_state.c
39 22 2
MQTTStatus_t MQTT_DeserializeAck()
in source/core_mqtt_serializer.c
59 17 3
MQTTStatus_t MQTT_SerializePublish()
in source/core_mqtt_serializer.c
70 15 4
static bool matchWildcards()
in source/core_mqtt.c
67 15 7
52 15 3
MQTTStatus_t MQTT_SerializePublishHeader()
in source/core_mqtt_serializer.c
67 14 5
78 14 5
MQTTStatus_t MQTT_MatchTopic()
in source/core_mqtt.c
49 13 5
29 12 1
static bool incomingPacketValid()
in source/core_mqtt_serializer.c
28 11 1
static void serializeConnectPacket()
in source/core_mqtt_serializer.c
77 11 4
MQTTStatus_t MQTT_GetConnectPacketSize()
in source/core_mqtt_serializer.c
57 11 4
MQTTStatus_t MQTT_Connect()
in source/core_mqtt.c
80 11 5
MQTTStatus_t MQTT_Publish()
in source/core_mqtt.c
53 11 3
MQTTStatus_t MQTT_UpdateStatePublish()
in source/core_mqtt_state.c
58 11 5
static void serializePublishCommon()
in source/core_mqtt_serializer.c
62 10 5
static bool matchTopicFilter()
in source/core_mqtt.c
46 10 4
30 10 3
static MQTTStatus_t deserializePublish()
in source/core_mqtt_serializer.c
56 9 3