aws-samples / iot-dotnet-publisher-consumer
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 10 units with 125 lines of code in units (49.4% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (65 lines of code)
    • 3 small units (44 lines of code)
    • 4 very small units (16 lines of code)
0% | 0% | 52% | 35% | 12%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 0% | 52% | 35% | 12%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Dotnetcoresamples/Iotdotnetcorepublisher0% | 0% | 100% | 0% | 0%
Dotnetsamples/Iotpublisher/Iotpublisher0% | 0% | 100% | 0% | 0%
Dotnetcoresamples/Iotdotnetcoreconsumer0% | 0% | 51% | 29% | 19%
Dotnetsamples/Iotconsumer/Iotconsumer0% | 0% | 0% | 80% | 20%
Alternative Visuals
Longest Units
Top 10 longest units
Unit# linesMcCabe index# params
static void Main()
in Dotnetcoresamples/Iotdotnetcorepublisher/Program.cs
22 2 1
static void Main()
in Dotnetsamples/Iotpublisher/Iotpublisher/Program.cs
22 2 1
static void Main()
in Dotnetcoresamples/Iotdotnetcoreconsumer/Program.cs
21 1 1
static void Main()
in Dotnetsamples/Iotconsumer/Iotconsumer/Program.cs
20 1 1
private static void KeepConsoleAppRunning()
in Dotnetcoresamples/Iotdotnetcoreconsumer/Program.cs
12 1 1
private static void KeepConsoleAppRunning()
in Dotnetsamples/Iotconsumer/Iotconsumer/Program.cs
12 1 1
private static void IotClient_MqttMsgPublishReceived()
in Dotnetcoresamples/Iotdotnetcoreconsumer/Program.cs
4 1 2
private static void IotClient_MqttMsgSubscribed()
in Dotnetcoresamples/Iotdotnetcoreconsumer/Program.cs
4 1 2
private static void Client_MqttMsgSubscribed()
in Dotnetsamples/Iotconsumer/Iotconsumer/Program.cs
4 1 2
private static void Client_MqttMsgPublishReceived()
in Dotnetsamples/Iotconsumer/Iotconsumer/Program.cs
4 1 2