microsoft / OpenAPI.NET.OData
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 581 units with 9,694 lines of code in units (74.2% of code).
    • 3 very long units (624 lines of code)
    • 19 long units (1,199 lines of code)
    • 112 medium size units (3,698 lines of code)
    • 159 small units (2,332 lines of code)
    • 288 very small units (1,841 lines of code)
6% | 12% | 38% | 24% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs6% | 12% | 38% | 24% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/Microsoft.OpenApi.OData.Reader/Generator9% | 18% | 45% | 18% | 7%
src/OoasGui50% | 0% | 19% | 15% | 15%
src/OoasUtil33% | 0% | 26% | 30% | 9%
src/Microsoft.OpenApi.OData.Reader/Edm0% | 16% | 45% | 19% | 17%
src/Microsoft.OpenApi.OData.Reader/Operation0% | 8% | 37% | 32% | 22%
src/Microsoft.OpenApi.OData.Reader/OData0% | 92% | 0% | 0% | 7%
src/Microsoft.OpenApi.OData.Reader/PathItem0% | 10% | 31% | 26% | 31%
src/Microsoft.OpenApi.OData.Reader/Vocabulary0% | 0% | 19% | 18% | 61%
tool/UpdateDocs0% | 0% | 75% | 24% | 0%
src/Microsoft.OpenApi.OData.Reader0% | 0% | 61% | 32% | 6%
src/Microsoft.OpenApi.OData.Reader/Common0% | 0% | 26% | 22% | 51%
src/Microsoft.OpenApi.OData.Reader/OpenApiExtensions0% | 0% | 0% | 100% | 0%
src/AssemblyInfo0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public static OpenApiSchema CreateSchema()
in src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs
256 37 2
private void InitializeComponent()
in src/OoasGui/MainForm.Designer.cs
208 1 0
public bool Process()
in src/OoasUtil/ComLineProcesser.cs
160 54 0
public static ODataValue Convert()
in src/Microsoft.OpenApi.OData.Reader/OData/IEdmExpressionExtensions.cs
97 19 1
private static OpenApiSchema CreateStructuredTypeSchema()
in src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs
82 14 5
protected override void SetResponses()
in src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs
71 6 1
private static IOpenApiAny GetTypeNameForExample()
in src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs
69 21 1
private void RetrieveNavigationPropertyPaths()
in src/Microsoft.OpenApi.OData.Reader/Edm/ODataPathProvider.cs
68 15 4
public static IList CreateParameters()
in src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs
65 12 3
protected override void SetParameters()
in src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs
65 6 1
public static OpenApiResponses CreateResponses()
in src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs
64 6 3
private IEnumerable GetDerivedTypeConstaintTypeNames()
in src/Microsoft.OpenApi.OData.Reader/Edm/ODataPathProvider.cs
62 12 1
public static IDictionary CreateLinks()
in src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiLinkGenerator.cs
60 9 6
protected override void SetParameters()
in src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs
60 13 1
protected override void SetResponses()
in src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs
58 3 1
public static IDictionary CreateSchemas()
in src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs
56 7 1
protected override void SetOperations()
in src/Microsoft.OpenApi.OData.Reader/PathItem/NavigationPropertyPathItemHandler.cs
56 20 1
private ODataPathKind CalcPathType()
in src/Microsoft.OpenApi.OData.Reader/Edm/ODataPath.cs
55 17 0
public static OpenApiParameter CreateOrderBy()
in src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs
55 11 3
private bool AppendBoundOperationOnDerived()
in src/Microsoft.OpenApi.OData.Reader/Edm/ODataPathProvider.cs
54 8 4