opensearch-project / dashboards-visualizations
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 11 units with 191 lines of code in units (23.8% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (120 lines of code)
    • 1 medium size units (45 lines of code)
    • 0 small units (0 lines of code)
    • 8 very small units (26 lines of code)
0% | 62% | 23% | 0% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
tsx0% | 100% | 0% | 0% | 0%
ts0% | 42% | 36% | 0% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
public/components0% | 100% | 0% | 0% | 0%
server/routes0% | 100% | 0% | 0% | 0%
public0% | 0% | 83% | 0% | 16%
server0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 11 longest units
Unit# linesMcCabe index# params
export function GanttChartEditor()
in gantt-chart/public/components/gantt_chart_editor.tsx
68 2 3
export function defineRoutes()
in gantt-chart/server/routes/index.ts
52 3 1
export function getGanttVisDefinition()
in gantt-chart/public/gantt_vis_type.ts
45 1 1
public setup()
in gantt-chart/public/plugin.ts
7 1 2
public setup()
in gantt-chart/server/plugin.ts
6 1 1
public start()
in gantt-chart/server/plugin.ts
4 1 1
export function plugin()
in gantt-chart/server/index.ts
3 1 1
constructor()
in gantt-chart/server/plugin.ts
3 1 1
public start()
in gantt-chart/public/plugin.ts
1 1 0
public stop()
in gantt-chart/public/plugin.ts
1 1 0
public stop()
in gantt-chart/server/plugin.ts
1 1 0