GerritCodeReview / plugins_checks
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 1,099 units with 10,641 lines of code in units (67.2% of code).
    • 1 very long units (103 lines of code)
    • 6 long units (370 lines of code)
    • 80 medium size units (2,378 lines of code)
    • 232 small units (3,334 lines of code)
    • 780 very small units (4,456 lines of code)
<1% | 3% | 22% | 31% | 41%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts21% | 14% | 7% | 36% | 19%
java0% | 2% | 23% | 31% | 42%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
web21% | 14% | 7% | 36% | 19%
javatests/com/google/gerrit/plugins/checks/acceptance0% | 3% | 24% | 26% | 45%
java/com/google/gerrit/plugins/checks0% | 7% | 14% | 45% | 31%
java/com/google/gerrit/plugins/checks/api0% | 4% | 31% | 25% | 38%
java/com/google/gerrit/plugins/checks/db0% | 0% | 30% | 39% | 29%
javatests/com/google/gerrit/plugins/checks/db0% | 0% | 10% | 52% | 37%
java/com/google/gerrit/plugins/checks/acceptance0% | 0% | 16% | 30% | 53%
java/com/google/gerrit/plugins/checks/rules0% | 0% | 70% | 0% | 29%
java/com/google/gerrit/plugins/checks/email0% | 0% | 24% | 32% | 43%
javatests/com/google/gerrit/plugins/checks/rules0% | 0% | 38% | 34% | 27%
javatests/com/google/gerrit/plugins/checks0% | 0% | 0% | 26% | 73%
javatests/com/google/gerrit/plugins/checks/api0% | 0% | 0% | 45% | 54%
java/com/google/gerrit/plugins/checks/index0% | 0% | 0% | 32% | 67%
java/com/google/gerrit/plugins/checks/testing0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
override render()
in web/gr-create-checkers-dialog.ts
103 1 0
public void queryPendingChecksWithScheme()
in javatests/com/google/gerrit/plugins/checks/acceptance/api/QueryPendingChecksIT.java
70 1 0
override render()
in web/gr-checkers-list.ts
68 1 0
public void verifyMessageBodiesForCombinedCheckStateUpdatedEmailWithChecksOfDifferentStates()
in javatests/com/google/gerrit/plugins/checks/acceptance/api/ChecksEmailIT.java
65 1 0
public void verifyMessageBodiesForCombinedCheckStateUpdatedEmailWithMultipleChecksOfSameState()
in javatests/com/google/gerrit/plugins/checks/acceptance/api/ChecksEmailIT.java
60 1 0
private void maybeSendEmail()
in java/com/google/gerrit/plugins/checks/ChecksUpdate.java
54 8 5
public Response apply()
in java/com/google/gerrit/plugins/checks/api/CreateChecker.java
53 12 2
private String allChecksOverviewHtml()
in javatests/com/google/gerrit/plugins/checks/acceptance/api/ChecksEmailIT.java
50 8 2
public void verifyMessageBodiesForCombinedCheckStateUpdatedEmailWithBackfilledCheck()
in javatests/com/google/gerrit/plugins/checks/acceptance/api/ChecksEmailIT.java
48 1 0
public void verifyMessageBodiesForCombinedCheckStateUpdatedToFailedEmailWithCheckerUrl()
in javatests/com/google/gerrit/plugins/checks/acceptance/api/ChecksEmailIT.java
47 1 0
private boolean updateNotesMap()
in java/com/google/gerrit/plugins/checks/db/NoteDbChecksUpdate.java
46 8 8
public void listAllWithOptionsViaRest()
in javatests/com/google/gerrit/plugins/checks/acceptance/api/ListChecksIT.java
45 1 0
public Response apply()
in java/com/google/gerrit/plugins/checks/api/RerunCheck.java
45 5 2
public void setup()
in javatests/com/google/gerrit/plugins/checks/acceptance/api/ChecksEmailIT.java
44 1 0
private void invalidateChecker()
in java/com/google/gerrit/plugins/checks/acceptance/testsuite/CheckerOperationsImpl.java
44 10 1
public void verifyMessageBodiesForCombinedCheckStateUpdatedToWarningFromFailedEmail()
in javatests/com/google/gerrit/plugins/checks/acceptance/api/ChecksEmailIT.java
43 1 0
public void verifyMessageBodiesForCombinedCheckStateUpdatedToFailedEmailWithCheckUrl()
in javatests/com/google/gerrit/plugins/checks/acceptance/api/ChecksEmailIT.java
42 1 0
public Response apply()
in java/com/google/gerrit/plugins/checks/api/UpdateChecker.java
42 11 2
private void testNotifySettingsForPostCheck()
in javatests/com/google/gerrit/plugins/checks/acceptance/api/ChecksEmailIT.java
41 3 4
public void verifyMessageBodiesForCombinedCheckStateUpdatedToFailedEmailWithCheckMessage()
in javatests/com/google/gerrit/plugins/checks/acceptance/api/ChecksEmailIT.java
41 1 0