opensearch-project / notifications
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 311 units with 5,689 lines of code in units (38.7% of code).
    • 6 very long units (1,128 lines of code)
    • 12 long units (864 lines of code)
    • 52 medium size units (1,797 lines of code)
    • 61 small units (943 lines of code)
    • 180 very small units (957 lines of code)
19% | 15% | 31% | 16% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
tsx25% | 23% | 36% | 10% | 5%
ts53% | 14% | 9% | 14% | 7%
kt0% | 3% | 31% | 27% | 38%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
dashboards-notifications/public/pages24% | 22% | 37% | 9% | 4%
dashboards-notifications/server/routes98% | 0% | 0% | 0% | 1%
dashboards-notifications/server/clusters0% | 100% | 0% | 0% | 0%
notifications/notifications/src0% | 4% | 25% | 25% | 44%
notifications/core/src0% | 0% | 46% | 30% | 22%
dashboards-notifications/public/services0% | 0% | 0% | 79% | 20%
notifications/core-spi/src0% | 0% | 0% | 51% | 48%
dashboards-notifications/server0% | 0% | 0% | 62% | 37%
dashboards-notifications/public0% | 0% | 0% | 52% | 48%
dashboards-notifications/public/utils0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function CreateChannel()
in dashboards-notifications/public/pages/CreateChannel/CreateChannel.tsx
437 53 1
export function configRoutes()
in dashboards-notifications/server/routes/configRoutes.ts
203 17 1
export function eventRoutes()
in dashboards-notifications/server/routes/eventRoutes.ts
135 14 1
export function CreateSESSender()
in dashboards-notifications/public/pages/Emails/CreateSESSender.tsx
129 12 1
export function CreateRecipientGroup()
in dashboards-notifications/public/pages/Emails/CreateRecipientGroup.tsx
112 8 1
export function NotificationsTable()
in dashboards-notifications/public/pages/Notifications/components/NotificationsTable/NotificationsTable.tsx
112 5 1
export function NotificationsPlugin()
in dashboards-notifications/server/clusters/notificationsPlugin.ts
91 1 3
export function CustomWebhookSettings()
in dashboards-notifications/public/pages/CreateChannel/components/CustomWebhookSettings.tsx
90 2 1
render()
in dashboards-notifications/public/pages/Channels/Channels.tsx
88 1 0
export function WebhookHeaders()
in dashboards-notifications/public/pages/CreateChannel/components/WebhookHeaders.tsx
87 9 1
export function TableFlyout()
in dashboards-notifications/public/pages/Notifications/components/NotificationsTable/Flyout/TableFlyout.tsx
84 1 1
export function ChannelActions()
in dashboards-notifications/public/pages/Channels/components/ChannelActions.tsx
69 7 1
constructor()
in dashboards-notifications/public/pages/Emails/components/tables/RecipientGroupsTable.tsx
69 3 1
constructor()
in dashboards-notifications/public/pages/Channels/Channels.tsx
63 5 1
override fun doExecute()
in notifications/notifications/src/main/kotlin/org/opensearch/notifications/action/PluginBaseAction.kt
59 10 3
constructor()
in dashboards-notifications/public/pages/Emails/components/tables/SendersTable.tsx
56 1 1
topicArn: validateArn()
in dashboards-notifications/public/pages/CreateChannel/components/SNSSettings.tsx
55 3 1
export function NotificationsHistogram()
in dashboards-notifications/public/pages/Notifications/components/NotificationsHistogram/NotificationsHistogram.tsx
53 1 1
senderName: validateSenderName()
in dashboards-notifications/public/pages/Emails/CreateSender.tsx
50 3 1
name: validateRecipientGroupName()
in dashboards-notifications/public/pages/Emails/components/forms/CreateRecipientGroupForm.tsx
50 1 1