freertos / coreMQTT-Agent
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 33 units with 885 lines of code in units (70.1% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (117 lines of code)
    • 15 medium size units (502 lines of code)
    • 16 small units (266 lines of code)
    • 0 very small units (0 lines of code)
0% | 13% | 56% | 30% | 0%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 13% | 56% | 30% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source0% | 13% | 56% | 30% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
61 3 3
static MQTTStatus_t createCommand()
in source/core_mqtt_agent.c
56 14 6
static MQTTStatus_t processCommand()
in source/core_mqtt_agent.c
50 13 3
static void mqttEventCallback()
in source/core_mqtt_agent.c
49 10 3
46 6 6
MQTTStatus_t MQTTAgent_Init()
in source/core_mqtt_agent.c
43 12 7
42 7 3
MQTTStatus_t MQTTAgent_CancelAll()
in source/core_mqtt_agent.c
37 7 1
static MQTTStatus_t resendPublishes()
in source/core_mqtt_agent.c
31 4 1
MQTTStatus_t MQTTAgent_CommandLoop()
in source/core_mqtt_agent.c
30 6 1
static bool validateParams()
in source/core_mqtt_agent.c
29 11 2
27 7 2
static void concludeCommand()
in source/core_mqtt_agent.c
25 3 4
static bool validateStruct()
in source/core_mqtt_agent.c
25 8 2
MQTTStatus_t MQTTAgentCommand_Connect()
in source/core_mqtt_agent_command_functions.c
24 2 3
MQTTStatus_t MQTTAgent_ResumeSession()
in source/core_mqtt_agent.c
23 4 2
MQTTStatus_t MQTTAgentCommand_Publish()
in source/core_mqtt_agent_command_functions.c
21 3 3
MQTTStatus_t MQTTAgentCommand_Subscribe()
in source/core_mqtt_agent_command_functions.c
20 1 3
MQTTStatus_t MQTTAgentCommand_Unsubscribe()
in source/core_mqtt_agent_command_functions.c
20 1 3
MQTTStatus_t MQTTAgent_Subscribe()
in source/core_mqtt_agent.c
19 3 3