awslabs / synchro-charts
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 185 units with 2,703 lines of code in units (12.6% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (184 lines of code)
    • 44 medium size units (1,455 lines of code)
    • 33 small units (471 lines of code)
    • 105 very small units (593 lines of code)
0% | 6% | 53% | 17% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
tsx0% | 8% | 58% | 13% | 19%
js0% | 0% | 73% | 10% | 16%
ts0% | 0% | 13% | 44% | 42%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
packages/synchro-charts/src/components0% | 15% | 24% | 25% | 34%
packages/synchro-charts/src/testing0% | 0% | 87% | 3% | 8%
packages/doc-site/src0% | 0% | 87% | 12% | 0%
packages/synchro-charts-react/src/react-component-lib0% | 0% | 13% | 55% | 30%
packages/synchro-charts/cypress/integration0% | 0% | 0% | 41% | 58%
packages/doc-site0% | 0% | 0% | 0% | 100%
packages/synchro-charts/configuration/jest0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
render()
in packages/synchro-charts/src/components/sc-kpi/sc-kpi-base/sc-kpi-base.tsx
66 20 0
render()
in packages/synchro-charts/src/components/sc-status-grid/sc-status-cell/sc-status-cell.tsx
65 25 0
onViewPortChange()
in packages/synchro-charts/src/components/charts/sc-webgl-base-chart/sc-webgl-base-chart.tsx
53 13 2
componentDidLoad()
in packages/synchro-charts/src/testing/test-routes/charts/shaders/status-timeline/multiple-statuses.tsx
47 1 0
render()
in packages/synchro-charts/src/components/charts/sc-legend/sc-legend-row/sc-legend-row.tsx
45 8 0
render()
in packages/synchro-charts/src/testing/test-routes/charts/sc-webgl-bar-chart/sc-webgl-bar-chart-dynamic-data.tsx
43 1 0
render()
in packages/synchro-charts/src/components/charts/sc-status-timeline/sc-status-timeline-overlay/sc-status-timeline-overlay.tsx
43 8 0
render()
in packages/synchro-charts/src/testing/test-routes/charts/status-timeline/status-timeline-dynamic-data.tsx
42 1 0
componentDidLoad()
in packages/synchro-charts/src/testing/test-routes/charts/shaders/sc-bar-chart/sc-multiple-bars.tsx
42 1 0
render()
in packages/synchro-charts/src/testing/test-routes/charts/sc-webgl-bar-chart/sc-webgl-bar-chart-fast-viewport.tsx
40 1 0
componentDidLoad()
in packages/synchro-charts/src/testing/test-routes/charts/shaders/sc-multiple-lines-overlapping.tsx
40 1 0
componentDidLoad()
in packages/synchro-charts/src/testing/test-routes/charts/shaders/sc-multiple-lines.tsx
40 1 0
render()
in packages/synchro-charts/src/components/sc-data-stream-name/sc-data-stream-name.tsx
40 5 0
render()
in packages/synchro-charts/src/testing/test-routes/charts/sc-webgl-chart-multi.tsx
39 1 0
render()
in packages/synchro-charts/src/testing/test-routes/charts/status-timeline/status-timeline-fast-viewport.tsx
39 1 0
render()
in packages/synchro-charts/src/testing/test-routes/charts/sc-webgl-scatter-chart/sc-scatter-chart-dynamic-data.tsx
36 1 0
render()
in packages/synchro-charts/src/testing/test-routes/charts/sc-webgl-bar-chart/sc-webgl-bar-chart-dynamic-buffer.tsx
36 1 0
componentDidLoad()
in packages/synchro-charts/src/testing/test-routes/charts/shaders/status-timeline/single-colored-status.tsx
36 1 0
componentDidLoad()
in packages/synchro-charts/src/testing/test-routes/charts/shaders/status-timeline/single-status.tsx
36 1 0
render()
in packages/synchro-charts/src/testing/test-routes/charts/sc-webgl-bar-chart/sc-webgl-bar-chart-start-from-zero.tsx
35 1 0