microsoft / service-fabric-reverse-proxy
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 86 units with 1,609 lines of code in units (67.8% of code).
    • 4 very long units (613 lines of code)
    • 3 long units (227 lines of code)
    • 8 medium size units (258 lines of code)
    • 15 small units (221 lines of code)
    • 56 very small units (290 lines of code)
38% | 14% | 16% | 13% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs38% | 14% | 16% | 13% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
sfintegration66% | 7% | 5% | 10% | 9%
sfintegration/Controllers0% | 55% | 31% | 10% | 2%
gateway0% | 0% | 67% | 26% | 5%
sfintegration/envoymodels0% | 0% | 0% | 25% | 74%
sfintegration/models0% | 0% | 0% | 13% | 86%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
static EnvoyDefaults()
in sfintegration/ServiceData.cs
194 41 0
156 22 0
137 19 1
private static void Handler()
in sfintegration/ServiceData.cs
126 18 2
private IActionResult GetRoutesForGateway()
in sfintegration/Controllers/v1.cs
88 16 2
static SF_Services()
in sfintegration/ServiceData.cs
73 14 0
public IActionResult GetRoutes()
in sfintegration/Controllers/v1.cs
66 11 3
44 8 0
public IActionResult GetClusters()
in sfintegration/Controllers/v1.cs
43 9 2
public IActionResult GetHosts()
in sfintegration/Controllers/v1.cs
43 8 1
29 7 0
27 5 1
static void InitClient()
in sfintegration/EnableResolveNotifications.cs
26 4 2
static int Main()
in gateway/Program.cs
23 2 1
private static void AddPartitionToService()
in sfintegration/ServiceData.cs
23 4 2
19 3 1
public IActionResult GetListeners()
in sfintegration/Controllers/v1.cs
19 3 2
18 6 0
public EnvoyListener()
in sfintegration/envoymodels/EnvoyListener.cs
17 3 4
public static void LogMessage()
in gateway/Program.cs
16 4 2