microsoft / automatic-graph-layout
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 7,974 units with 82,087 lines of code in units (76.6% of code).
    • 20 very long units (2,680 lines of code)
    • 98 long units (6,478 lines of code)
    • 738 medium size units (21,897 lines of code)
    • 1,548 small units (22,306 lines of code)
    • 5,570 very small units (28,726 lines of code)
3% | 7% | 26% | 27% | 34%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs3% | 8% | 27% | 27% | 33%
js2% | 5% | 17% | 21% | 53%
ts0% | 9% | 34% | 24% | 31%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
GraphLayout/MSAGL/GraphmapsWithMesh26% | 35% | 24% | 8% | 4%
GraphLayout/tools/Dot2Graph42% | 21% | 13% | 8% | 14%
GraphLayout/MSAGL/Layout1% | 8% | 31% | 28% | 30%
GraphLayout/MSAGL/Core1% | 12% | 30% | 23% | 31%
GraphLayout/MsaglSharpkit/MsaglDrawingSharpkit2% | 1% | 17% | 22% | 55%
GraphLayout/Drawing6% | 2% | 18% | 28% | 44%
GraphLayout/MSAGL/Routing<1% | 1% | 25% | 32% | 40%
GraphLayout/tools/GraphViewerGDI2% | 6% | 37% | 22% | 31%
GraphLayout/tools/GraphmapsWpfControl3% | 10% | 18% | 31% | 35%
GraphLayout/MsaglSharpkit/WebMsagl0% | 13% | 25% | 21% | 39%
GraphLayout/MSAGL/DebugHelpers0% | 10% | 21% | 33% | 33%
GraphLayout/tools/QUT.ShiftReduceParser0% | 14% | 28% | 15% | 41%
GraphLayout/tools/UwpGraphControl0% | 3% | 23% | 34% | 38%
GraphLayout/tools/Dot2Svg0% | 16% | 24% | 35% | 23%
GraphLayout/MSAGL/Miscellaneous0% | 2% | 29% | 34% | 33%
GraphLayout/tools/WpfGraphControl0% | 0% | 27% | 32% | 39%
GraphLayout/Drawing/LayoutEditing0% | 0% | 19% | 32% | 47%
GraphLayout/tools/agl0% | 0% | 48% | 33% | 18%
GraphLayout/tools/FormForGViewer0% | 0% | 27% | 38% | 33%
GraphLayout/MsaglSharpkit/ConsoleTest0% | 0% | 51% | 24% | 24%
GraphLayout/tools/DgmlParser0% | 0% | 56% | 27% | 15%
GraphLayout/tools/ArgsParser0% | 0% | 27% | 35% | 37%
GraphLayout/MsaglSharpkit/MsaglSharpKit0% | 0% | 37% | 0% | 62%
GraphLayout/WriteToSvgSample0% | 0% | 0% | 72% | 27%
GraphLayout/tools/DebugCurveViewer0% | 0% | 0% | 70% | 29%
GraphLayout/TinyClickDemo0% | 0% | 0% | 74% | 25%
GraphLayout/MSAGL0% | 0% | 0% | 44% | 56%
GraphLayout/tools/Utilities0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
internal static AttributeValuePair CreateFromsStrings()
in GraphLayout/tools/Dot2Graph/AttributeValuePair.cs
299 104 2
void CreateRegularSplines()
in GraphLayout/MSAGL/Layout/Layered/Routing.cs
165 27 0
protected override void DoAction()
in GraphLayout/tools/Dot2Graph/Dot.cs
153 51 1
public void ComputeShortcutMesh()
in GraphLayout/MSAGL/GraphmapsWithMesh/Tiling.cs
151 62 2
void InitColorSet()
in GraphLayout/Drawing/SvgGraphWriter.cs
143 1 0
InitColorSet: function()
in GraphLayout/MsaglSharpkit/MsaglDrawingSharpkit/res/Microsoft.Msagl.Drawing.js
143 1 0
static Parser()
in GraphLayout/tools/Dot2Graph/Dot.cs
137 2 0
public IEnumerable GetOrder()
in GraphLayout/MSAGL/Routing/Spline/Bundling/GeneralMetroMapOrdering.cs
125 29 2
private static void ComputePathSimplification()
in GraphLayout/MSAGL/Layout/LargeGraphLayout/LgInteractor.cs
123 25 3
public static void CreateCompetitionMesh()
in GraphLayout/MSAGL/GraphmapsWithMesh/MeshCreator.cs
122 48 4
public static void CreateCompetitionMeshWithLeftPriority()
in GraphLayout/MSAGL/GraphmapsWithMesh/MeshCreator.cs
122 50 4
void GenerateFromEvents()
in GraphLayout/MSAGL/Core/Geometry/OverlapRemoval/OverlapRemovalCluster.cs
117 25 4
public static void ProcessLeftRays()
in GraphLayout/MSAGL/GraphmapsWithMesh/MeshCreator.cs
117 36 6
public static void ProcessRightRays()
in GraphLayout/MSAGL/GraphmapsWithMesh/MeshCreator.cs
115 36 6
void InitializeComponent()
in GraphLayout/tools/GraphViewerGDI/GViewer.cs
114 1 0
public IEnumerator GetEnumerator()
in GraphLayout/MSAGL/Core/Geometry/Curves/Polyline.cs
113 13 0
void InvalidateNodesOfRailGraph()
in GraphLayout/tools/GraphmapsWpfControl/GraphmapsViewer.cs
112 23 1
public static void ProcessUpwardRays()
in GraphLayout/MSAGL/GraphmapsWithMesh/MeshCreator.cs
103 29 4
public static void ProcessDownwardRays()
in GraphLayout/MSAGL/GraphmapsWithMesh/MeshCreator.cs
103 28 4
public void MsaglDetour()
in GraphLayout/MSAGL/GraphmapsWithMesh/Tiling.cs
103 26 2