awslabs / amazon-kinesis-client-net
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 68 units with 563 lines of code in units (56.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (52 lines of code)
    • 4 medium size units (122 lines of code)
    • 9 small units (135 lines of code)
    • 54 very small units (254 lines of code)
0% | 9% | 21% | 23% | 45%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 9% | 21% | 23% | 45%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Bootstrap0% | 33% | 36% | 22% | 6%
SampleProducer0% | 0% | 68% | 31% | 0%
SampleConsumer0% | 0% | 36% | 15% | 47%
ClientLibrary0% | 0% | 0% | 22% | 77%
ClientLibrary/messages0% | 0% | 0% | 31% | 68%
ClientLibrary/inputs0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public static void Main()
in Bootstrap/Bootstrap.cs
52 5 1
public static void Main()
in SampleProducer/SampleProducer.cs
40 4 1
30 4 0
private static string FindJava()
in Bootstrap/Bootstrap.cs
26 3 1
private void ProcessRecordsWithRetries()
in SampleConsumer/SampleConsumer.cs
26 5 1
private static string FetchJars()
in Bootstrap/Bootstrap.cs
20 4 1
public static Action Parse()
in ClientLibrary/messages/Action.cs
20 2 1
private static void WaitForStreamToBecomeAvailable()
in SampleProducer/SampleProducer.cs
18 3 1
internal override void Checkpoint()
in ClientLibrary/ClientLibrary.cs
16 3 2
public void Fetch()
in Bootstrap/Bootstrap.cs
15 3 1
private bool ProcessNextLine()
in ClientLibrary/ClientLibrary.cs
13 2 0
public static CheckpointErrorHandler Create()
in ClientLibrary/ClientLibrary.cs
11 2 2
public string ToJson()
in ClientLibrary/messages/Action.cs
11 1 0
public static void Main()
in SampleConsumer/SampleConsumer.cs
11 2 1
public DefaultRecord()
in ClientLibrary/ClientLibrary.cs
9 1 5
public void ProcessRecords()
in SampleConsumer/SampleConsumer.cs
9 2 1
public MavenPackage()
in Bootstrap/Bootstrap.cs
6 1 3
public DefaultProcessRecordsInput()
in ClientLibrary/ClientLibrary.cs
6 1 2
public DefaultInitializationInput()
in ClientLibrary/ClientLibrary.cs
6 1 1
public IoHandler()
in ClientLibrary/ClientLibrary.cs
6 1 3