GerritCodeReview / gerrit-ci-scripts
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 18 units with 316 lines of code in units (11.1% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (80 lines of code)
    • 4 medium size units (117 lines of code)
    • 5 small units (68 lines of code)
    • 8 very small units (51 lines of code)
0% | 25% | 37% | 21% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
groovy0% | 25% | 37% | 21% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
vars0% | 29% | 35% | 25% | 9%
jenkins-docker/server0% | 0% | 44% | 0% | 55%
Alternative Visuals
Longest Units
Top 18 longest units
Unit# linesMcCabe index# params
def call()
in vars/pluginPipeline.groovy
80 8 1
def prepareBuildsForMode()
in vars/gerritPipeline.groovy
34 5 3
def call()
in vars/gerritPipeline.groovy
31 4 1
def collectBuildModes()
in vars/gerritPipeline.groovy
31 13 0
def extractCredFromFile()
in jenkins-docker/server/setCredentials.groovy
21 3 1
def getLabelValue()
in vars/gerritPipeline.groovy
18 9 2
def findFlakyBuilds()
in vars/gerritPipeline.groovy
14 3 0
def getCheckResultFromBuild()
in vars/gerritPipeline.groovy
12 5 0
def collectBuilds()
in vars/gerritPipeline.groovy
12 2 0
def findCodestyleFilesInLog()
in vars/gerritPipeline.groovy
12 4 1
def addStringCredential()
in jenkins-docker/server/setCredentials.groovy
10 1 3
def addUserPasswordCredential()
in jenkins-docker/server/setCredentials.groovy
10 1 4
def setResult()
in vars/gerritPipeline.groovy
9 5 2
def queryChangedFiles()
in vars/gerritPipeline.groovy
7 1 1
def addCredentials()
in jenkins-docker/server/setCredentials.groovy
6 1 1
def hasChangeNumber()
in vars/gerritPipeline.groovy
3 1 0
def postCheck()
in vars/gerritPipeline.groovy
3 1 1
def buildVerificationJob()
in vars/gerritPipeline.groovy
3 3 0