GerritCodeReview / plugins_events
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 141 units with 985 lines of code in units (67.1% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (71 lines of code)
    • 22 small units (315 lines of code)
    • 116 very small units (599 lines of code)
0% | 0% | 7% | 31% | 60%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java0% | 0% | 7% | 32% | 60%
py0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/main/java/com/googlesource/gerrit/plugins/events/fsstore0% | 0% | 6% | 23% | 70%
src/main/java/com/googlesource/gerrit/plugins/events0% | 0% | 8% | 59% | 31%
tools0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public long spinIncrement()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/FsSequence.java
28 8 1
public void start()
in src/main/java/com/googlesource/gerrit/plugins/events/StreamEvents.java
22 3 2
public static boolean tryRecursiveDelete()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/Fs.java
21 2 1
protected static BranchNameKey getBranch()
in src/main/java/com/googlesource/gerrit/plugins/events/BranchHelper.java
19 6 1
protected void flushBatch()
in src/main/java/com/googlesource/gerrit/plugins/events/StreamEvents.java
19 5 0
protected void parseId()
in src/main/java/com/googlesource/gerrit/plugins/events/StreamEvents.java
18 5 1
public void trim()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/FsStore.java
18 6 1
protected UniqueUpdate spinSubmit()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/EventSequence.java
18 4 2
protected CancelableRunnable createFlusherRunnable()
in src/main/java/com/googlesource/gerrit/plugins/events/StreamEvents.java
16 2 0
public static boolean isAllEntriesOlderThan()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/Fs.java
16 6 2
public static boolean renameAndDeleteEntriesOlderThan()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/FsTransaction.java
16 5 4
protected T spinGet()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/UpdatableFileValue.java
16 4 0
public static boolean tryRecursiveDeleteEntriesOlderThan()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/Fs.java
15 6 3
public static BranchNameKey getBranch()
in src/main/java/com/googlesource/gerrit/plugins/events/BranchHelper.java
14 4 1
protected void subscribe()
in src/main/java/com/googlesource/gerrit/plugins/events/StreamEvents.java
14 2 0
public void initFs()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/UpdatableFileValue.java
13 3 1
protected void initSent()
in src/main/java/com/googlesource/gerrit/plugins/events/StreamEvents.java
12 4 0
public void destroy()
in src/main/java/com/googlesource/gerrit/plugins/events/StreamEvents.java
12 3 1
protected void flush()
in src/main/java/com/googlesource/gerrit/plugins/events/StreamEvents.java
12 4 3
protected void createAndProposeNext()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/UpdatableFileValue.java
12 4 0