pytorch / ossci-job-dsl
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 129 units with 2,342 lines of code in units (25.4% of code).
    • 2 very long units (468 lines of code)
    • 4 long units (228 lines of code)
    • 19 medium size units (594 lines of code)
    • 31 small units (420 lines of code)
    • 73 very small units (632 lines of code)
19% | 9% | 25% | 17% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
groovy20% | 9% | 25% | 18% | 26%
py0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/main28% | 6% | 15% | 18% | 30%
ossci30% | 7% | 14% | 16% | 31%
jobs0% | 16% | 50% | 17% | 15%
src/jobs0% | 16% | 50% | 17% | 15%
ossci/caffe20% | 0% | 0% | 64% | 35%
resources/ecr-gc0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
static void shell()
in ossci/DockerUtil.groovy
234 54 1
static void shell()
in src/main/groovy/ossci/DockerUtil.groovy
234 54 1
57 4 5
image: dockerImage()
in jobs/caffe2.groovy
57 12 1
image: dockerImage()
in src/jobs/caffe2.groovy
57 12 1
static void gitHubPullRequestTrigger()
in src/main/groovy/ossci/JobUtil.groovy
57 4 5
45 9 2
static void resolveAndSaveParameters()
in src/main/groovy/ossci/GitUtil.groovy
45 9 2
image: dockerImage()
in jobs/pytorch.groovy
42 7 4
image: dockerImage()
in src/jobs/pytorch.groovy
42 7 4
static void sandboxShell()
in ossci/MacOSUtil.groovy
37 1 2
static void sandboxShell()
in src/main/groovy/ossci/MacOSUtil.groovy
37 1 2
image: dockerImage()
in jobs/detectron.groovy
33 7 1
image: dockerImage()
in src/jobs/detectron.groovy
33 7 1
image: dockerImage()
in jobs/caffe2.groovy
29 5 1
image: dockerImage()
in src/jobs/caffe2.groovy
29 5 1
def sendEmail()
in ossci/EmailUtil.groovy
27 1 3
image: dockerImage()
in jobs/caffe2.groovy
27 5 1
image: dockerImage()
in src/jobs/caffe2.groovy
27 5 1
def sendEmail()
in src/main/groovy/ossci/EmailUtil.groovy
27 1 3