opensearch-project / common-utils
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 288 units with 2,401 lines of code in units (48.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 34 medium size units (969 lines of code)
    • 30 small units (407 lines of code)
    • 224 very small units (1,025 lines of code)
0% | 0% | 40% | 16% | 42%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
kt0% | 0% | 46% | 10% | 42%
java0% | 0% | 24% | 33% | 42%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/main/kotlin/org/opensearch/commons/notifications/model0% | 0% | 58% | 4% | 36%
src/main/kotlin/org/opensearch/commons/notifications/action0% | 0% | 46% | 3% | 49%
src/main/java/org/opensearch/commons/authuser0% | 0% | 35% | 25% | 39%
src/main/java/org/opensearch/commons/rest0% | 0% | 32% | 40% | 26%
src/main/java/org/opensearch/commons/destination/message0% | 0% | 18% | 34% | 46%
src/main/kotlin/org/opensearch/commons/notifications0% | 0% | 0% | 93% | 6%
src/main/java/org/opensearch/commons0% | 0% | 0% | 44% | 55%
src/main/kotlin/org/opensearch/commons/utils0% | 0% | 0% | 8% | 91%
src/main/java/org/opensearch/commons/destination/response0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
fun parse()
in src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfig.kt
44 4 1
private LegacyCustomWebhookMessage()
in src/main/java/org/opensearch/commons/destination/message/LegacyCustomWebhookMessage.java
42 13 10
public static User parse()
in src/main/java/org/opensearch/commons/authuser/User.java
41 10 1
fun parse()
in src/main/kotlin/org/opensearch/commons/notifications/model/EventSource.kt
37 2 1
fun parse()
in src/main/kotlin/org/opensearch/commons/notifications/model/EventStatus.kt
37 2 1
fun parse()
in src/main/kotlin/org/opensearch/commons/notifications/model/FeatureChannel.kt
37 2 1
fun parse()
in src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfigInfo.kt
35 2 1
fun parse()
in src/main/kotlin/org/opensearch/commons/notifications/model/SmtpAccount.kt
35 2 1
fun parse()
in src/main/kotlin/org/opensearch/commons/notifications/model/NotificationEventInfo.kt
35 2 1
private RestClientBuilder createRestClientBuilder()
in src/main/java/org/opensearch/commons/rest/SecureRestClientBuilder.java
32 4 0
fun parse()
in src/main/kotlin/org/opensearch/commons/notifications/action/GetNotificationConfigRequest.kt
30 2 1
fun parse()
in src/main/kotlin/org/opensearch/commons/notifications/action/GetNotificationEventRequest.kt
30 2 1
fun parse()
in src/main/kotlin/org/opensearch/commons/notifications/model/SesAccount.kt
30 2 1
fun parse()
in src/main/kotlin/org/opensearch/commons/notifications/action/SendNotificationRequest.kt
29 2 1
fun parse()
in src/main/kotlin/org/opensearch/commons/notifications/model/Attachment.kt
29 2 1
fun parse()
in src/main/kotlin/org/opensearch/commons/notifications/model/ChannelMessage.kt
29 2 1
fun parse()
in src/main/kotlin/org/opensearch/commons/notifications/model/NotificationEvent.kt
29 3 1
fun parse()
in src/main/kotlin/org/opensearch/commons/notifications/action/GetPluginFeaturesResponse.kt
27 2 1
fun parse()
in src/main/kotlin/org/opensearch/commons/notifications/model/DeliveryStatus.kt
27 2 1
private String resolve()
in src/main/java/org/opensearch/commons/rest/SecureRestClientBuilder.java
27 8 2