microsoft / Vipr
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 260 units with 2,603 lines of code in units (48.2% of code).
    • 1 very long units (110 lines of code)
    • 1 long units (66 lines of code)
    • 26 medium size units (833 lines of code)
    • 38 small units (564 lines of code)
    • 194 very small units (1,030 lines of code)
4% | 2% | 32% | 21% | 39%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs4% | 2% | 32% | 21% | 39%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/Readers/Vipr.Reader.OData.v410% | 6% | 46% | 22% | 14%
src/Core/Vipr0% | 0% | 30% | 18% | 51%
src/Readers/Vipr.Reader.OData.v4/Capabilities0% | 0% | 44% | 21% | 33%
src/Core/Vipr.Core/CodeModel0% | 0% | 0% | 26% | 73%
src/Core/Vipr.Core0% | 0% | 0% | 25% | 74%
src/Core/Vipr.Core/CodeModel/Vocabularies0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void WriteNamespaceDeep()
in src/Readers/Vipr.Reader.OData.v4/OdcmReader.cs
110 19 2
private bool CheckForDeprecationOnType()
in src/Readers/Vipr.Reader.OData.v4/OdcmReader.cs
66 14 2
private OdcmMethod WriteMethod()
in src/Readers/Vipr.Reader.OData.v4/OdcmReader.cs
48 12 2
private void TryParseCapability()
in src/Readers/Vipr.Reader.OData.v4/Capabilities/CapabilityAnnotationParser.cs
44 11 3
private static Type CreateConcreteType()
in src/Core/Vipr/odataDemo.cs
43 8 1
public static IEnumerable GetOdcmAnnotations()
in src/Readers/Vipr.Reader.OData.v4/ODataVocabularyReader.cs
43 8 2
private void WriteProperty()
in src/Readers/Vipr.Reader.OData.v4/OdcmReader.cs
43 6 2
public static void WriteAsync()
in src/Core/Vipr/FileWriter.cs
42 11 2
public DataServiceContextWrapper()
in src/Core/Vipr/odataDemo.cs
37 5 3
private void ParseCollection()
in src/Readers/Vipr.Reader.OData.v4/Capabilities/CapabilityAnnotationParser.cs
37 7 3
private static object FetchNewInstanceOfAnnotationComplexType()
in src/Readers/Vipr.Reader.OData.v4/ODataVocabularyReader.cs
34 6 1
private void WriteNamespaceShallow()
in src/Readers/Vipr.Reader.OData.v4/OdcmReader.cs
33 7 2
private void WriteProperty()
in src/Readers/Vipr.Reader.OData.v4/OdcmReader.cs
33 3 2
private void WriteProperty()
in src/Readers/Vipr.Reader.OData.v4/OdcmReader.cs
32 3 2
private static object FetchNewInstanceOfAmbiguousBinding()
in src/Readers/Vipr.Reader.OData.v4/ODataVocabularyReader.cs
31 5 1
public IReadOnlyQueryableSet Where()
in src/Core/Vipr/odataDemo.cs
30 7 1
private static object MapListElements()
in src/Readers/Vipr.Reader.OData.v4/ODataVocabularyReader.cs
30 4 1
public OdcmModel GenerateOdcmModel()
in src/Readers/Vipr.Reader.OData.v4/OdcmReader.cs
30 5 1
private OdcmProperty PropertyFromPathExpression()
in src/Readers/Vipr.Reader.OData.v4/Capabilities/CapabilityAnnotationParser.cs
28 4 2
internal static object MapToClr()
in src/Readers/Vipr.Reader.OData.v4/ODataVocabularyReader.cs
28 17 2