aws-samples / aws-iot-dotnet-publisher-http
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 25 units with 336 lines of code in units (68.4% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (70 lines of code)
    • 12 small units (200 lines of code)
    • 11 very small units (66 lines of code)
0% | 0% | 20% | 59% | 19%
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% | 20% | 59% | 19%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
dotnetcore/utils0% | 0% | 23% | 46% | 30%
dotnet/Awsiotdevicepubhttp/Awsiotdevicepubhttp/utils0% | 0% | 28% | 55% | 16%
dotnetcore0% | 0% | 0% | 100% | 0%
dotnet/Awsiotdevicepubhttp/Awsiotdevicepubhttp0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public static void InvokeHttpRequest()
in dotnetcore/utils/HttpHelpers.cs
35 5 4
public static void InvokeHttpRequest()
in dotnet/Awsiotdevicepubhttp/Awsiotdevicepubhttp/utils/HttpHelpers.cs
35 5 4
public static HttpWebRequest ConstructWebRequest()
in dotnetcore/utils/HttpHelpers.cs
19 5 3
public static HttpWebResponse GetResponse()
in dotnetcore/utils/HttpHelpers.cs
19 3 1
public static HttpWebRequest ConstructWebRequest()
in dotnet/Awsiotdevicepubhttp/Awsiotdevicepubhttp/utils/HttpHelpers.cs
19 5 3
public static HttpWebResponse GetResponse()
in dotnet/Awsiotdevicepubhttp/Awsiotdevicepubhttp/utils/HttpHelpers.cs
19 3 1
public static string ReadResponseBody()
in dotnetcore/utils/HttpHelpers.cs
17 3 1
public static string ReadResponseBody()
in dotnet/Awsiotdevicepubhttp/Awsiotdevicepubhttp/utils/HttpHelpers.cs
17 3 1
private static void InvokeHttpPost()
in dotnetcore/Program.cs
16 1 3
private static void InvokeHttpPost()
in dotnet/Awsiotdevicepubhttp/Awsiotdevicepubhttp/Program.cs
16 1 3
static void Main()
in dotnetcore/Program.cs
15 2 1
static void Main()
in dotnet/Awsiotdevicepubhttp/Awsiotdevicepubhttp/Program.cs
15 2 1
public static string UrlEncode()
in dotnetcore/utils/HttpHelpers.cs
14 4 2
public static string UrlEncode()
in dotnet/Awsiotdevicepubhttp/Awsiotdevicepubhttp/utils/HttpHelpers.cs
14 4 2
public static void LogInfo()
in dotnetcore/utils/Logger.cs
8 2 1
public static void LogDebug()
in dotnetcore/utils/Logger.cs
8 2 1
public static void LogError()
in dotnetcore/utils/Logger.cs
8 2 1
public static void LogFatal()
in dotnetcore/utils/Logger.cs
8 2 1
public static void LogWarn()
in dotnetcore/utils/Logger.cs
8 2 1
private static void ConfigureLog4Net()
in dotnetcore/utils/Logger.cs
6 1 0