opensearch-project / index-management-dashboards-plugin
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 197 units with 4,901 lines of code in units (23.7% of code).
    • 9 very long units (1,666 lines of code)
    • 20 long units (1,385 lines of code)
    • 28 medium size units (929 lines of code)
    • 31 small units (437 lines of code)
    • 109 very small units (484 lines of code)
33% | 28% | 18% | 8% | 9%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
tsx31% | 30% | 21% | 8% | 7%
ts42% | 20% | 10% | 8% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
public/pages31% | 29% | 20% | 9% | 9%
server/clusters97% | 0% | 0% | 0% | 2%
server/routes28% | 54% | 13% | 3% | 0%
server/utils0% | 0% | 58% | 27% | 14%
public0% | 0% | 46% | 29% | 24%
server0% | 0% | 81% | 0% | 18%
server/services0% | 0% | 0% | 25% | 74%
public/services0% | 0% | 0% | 0% | 100%
public/utils0% | 0% | 0% | 0% | 100%
public/temporary0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
render()
in public/pages/CreateRollup/components/MetricsCalculation/MetricsCalculation.tsx
424 4 0
export default function ismPlugin()
in server/clusters/ism/ismPlugin.ts
328 1 3
render()
in public/pages/CreateRollup/containers/CreateRollupForm/CreateRollupForm.tsx
161 4 0
render()
in public/pages/Transforms/containers/Transforms/TransformDetails.tsx
150 3 0
render()
in public/pages/CreateTransform/containers/CreateTransformForm/CreateTransformForm.tsx
137 6 0
render()
in public/pages/CreateRollup/components/HistogramAndMetrics/HistogramAndMetrics.tsx
127 2 0
render()
in public/pages/RollupDetails/containers/RollupDetails/RollupDetails.tsx
120 6 0
render()
in public/pages/CreateRollup/components/AdvancedAggregation/AdvancedAggregation.tsx
114 5 0
export default function()
in server/routes/transforms.ts
105 1 2
render()
in public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.tsx
96 10 0
render()
in public/pages/CreateTransform/components/ReviewDefinition/ReviewDefinition.tsx
90 5 0
export default function()
in server/routes/rollups.ts
87 1 2
export default function DateHistogramPanel()
in public/pages/CreateTransform/components/TransformOptions/Panels/DateHistogramPanel/DateHistogramPanel.tsx
86 2 4
render()
in public/pages/Rollups/containers/Rollups/Rollups.tsx
82 2 0
render()
in public/pages/Indices/containers/Indices/Indices.tsx
80 1 0
constructor()
in public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.tsx
79 4 1
render()
in public/pages/Transforms/containers/Transforms/EditTransform.tsx
70 1 0
render()
in public/pages/Transforms/containers/Transforms/TransformSettings.tsx
69 3 0
render()
in public/pages/CreateRollup/components/RollupIndices/RollupIndices.tsx
68 2 0
render()
in public/pages/CreateRollup/containers/CreateRollupStep3/CreateRollupStep3.tsx
64 2 0