GerritCodeReview / plugins_lfs
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 153 units with 1,175 lines of code in units (47.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (56 lines of code)
    • 12 medium size units (334 lines of code)
    • 19 small units (263 lines of code)
    • 121 very small units (522 lines of code)
0% | 4% | 28% | 22% | 44%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java0% | 4% | 29% | 21% | 44%
js0% | 0% | 0% | 42% | 57%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/main/java/com/googlesource/gerrit/plugins/lfs0% | 14% | 27% | 17% | 41%
src/main/java/com/googlesource/gerrit/plugins/lfs/locks0% | 0% | 38% | 14% | 46%
src/main/java/com/googlesource/gerrit/plugins/lfs/auth0% | 0% | 16% | 33% | 50%
src/main/java/com/googlesource/gerrit/plugins/lfs/fs0% | 0% | 15% | 40% | 43%
src/main/java/com/googlesource/gerrit/plugins/lfs/s30% | 0% | 100% | 0% | 0%
gr-lfs0% | 0% | 0% | 42% | 57%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public Response apply()
in src/main/java/com/googlesource/gerrit/plugins/lfs/PutLfsGlobalConfig.java
56 14 2
LfsLock createLock()
in src/main/java/com/googlesource/gerrit/plugins/lfs/locks/LfsProjectLocks.java
47 6 2
protected LargeFileRepository getLargeFileRepository()
in src/main/java/com/googlesource/gerrit/plugins/lfs/LfsApiServlet.java
40 14 3
public String authenticate()
in src/main/java/com/googlesource/gerrit/plugins/lfs/auth/LfsSshAuth.java
32 5 2
void deleteLock()
in src/main/java/com/googlesource/gerrit/plugins/lfs/locks/LfsProjectLocks.java
32 4 1
void load()
in src/main/java/com/googlesource/gerrit/plugins/lfs/locks/LfsProjectLocks.java
25 5 0
public void run()
in src/main/java/com/googlesource/gerrit/plugins/lfs/locks/LfsLocksAction.java
25 7 0
public LfsProjectConfigSection getForProject()
in src/main/java/com/googlesource/gerrit/plugins/lfs/LfsProjectsConfig.java
24 10 1
private Optional validateGetRequest()
in src/main/java/com/googlesource/gerrit/plugins/lfs/fs/LfsFsContentServlet.java
23 4 2
LfsLockResponse deleteLock()
in src/main/java/com/googlesource/gerrit/plugins/lfs/locks/LfsLocksHandler.java
22 5 4
public LargeFileRepository get()
in src/main/java/com/googlesource/gerrit/plugins/lfs/LfsRepositoryResolver.java
22 4 2
private static S3Config getS3Config()
in src/main/java/com/googlesource/gerrit/plugins/lfs/s3/S3LargeFileRepository.java
21 2 2
public Response apply()
in src/main/java/com/googlesource/gerrit/plugins/lfs/GetLfsGlobalConfig.java
21 3 1
protected void doPut()
in src/main/java/com/googlesource/gerrit/plugins/lfs/fs/LfsFsContentServlet.java
19 3 2
protected String getProjectName()
in src/main/java/com/googlesource/gerrit/plugins/lfs/locks/LfsPutLocksAction.java
19 4 0
private void authorizeUser()
in src/main/java/com/googlesource/gerrit/plugins/lfs/LfsApiServlet.java
18 5 3
protected void configure()
in src/main/java/com/googlesource/gerrit/plugins/lfs/Module.java
16 1 0
public Optional decrypt()
in src/main/java/com/googlesource/gerrit/plugins/lfs/auth/LfsCipher.java
15 3 1
protected void doHead()
in src/main/java/com/googlesource/gerrit/plugins/lfs/fs/LfsFsContentServlet.java
15 4 2
public Path getForBackend()
in src/main/java/com/googlesource/gerrit/plugins/lfs/fs/LfsFsDataDirectoryManager.java
15 4 2