bazelbuild / rules_kotlin
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 102 units with 1,102 lines of code in units (12.4% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (89 lines of code)
    • 10 medium size units (320 lines of code)
    • 23 small units (332 lines of code)
    • 68 very small units (361 lines of code)
0% | 8% | 29% | 30% | 32%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
kt0% | 8% | 30% | 29% | 32%
py0% | 0% | 0% | 62% | 37%
java0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/main/kotlin/io0% | 8% | 29% | 29% | 32%
kotlin/internal/js0% | 0% | 0% | 62% | 37%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
fun execute()
in src/main/kotlin/io/bazel/kotlin/builder/tasks/jvm/KotlinJvmTaskExecutor.kt
89 10 2
fun merge()
in src/main/kotlin/io/bazel/kotlin/builder/tasks/jvm/JdepsMerger.kt
49 6 5
override fun check()
in src/main/kotlin/io/bazel/kotlin/plugin/jdeps/JdepsGenExtension.kt
46 1 3
override fun check()
in src/main/kotlin/io/bazel/kotlin/plugin/jdeps/JdepsGenExtension.kt
34 1 3
fun createToolchain()
in src/main/kotlin/io/bazel/kotlin/builder/toolchain/KotlinToolchain.kt
34 1 1
fun generateJDeps()
in src/main/kotlin/io/bazel/kotlin/builder/tasks/jvm/JDepsGenerator.kt
34 5 1
fun resolveVerified()
in src/main/kotlin/io/bazel/kotlin/builder/utils/BazelUtils.kt
28 4 1
fun build()
in src/main/kotlin/io/bazel/kotlin/builder/tasks/KotlinBuilder.kt
27 3 2
fun executeCompilerTask()
in src/main/kotlin/io/bazel/kotlin/builder/toolchain/CompilationTaskContext.kt
23 4 3
fun compile()
in src/main/kotlin/io/bazel/kotlin/builder/tasks/jvm/JavaCompiler.kt
23 2 2
protected fun extract()
in src/main/kotlin/io/bazel/kotlin/builder/utils/jars/JarExtractor.kt
22 3 1
fun getClassCanonicalPath()
in src/main/kotlin/io/bazel/kotlin/plugin/jdeps/JdepsGenExtension.kt
20 4 1
fun parse()
in src/main/kotlin/io/bazel/kotlin/builder/tasks/jvm/JdepsParser.kt
19 1 5
def _extract_root_entry()
in kotlin/internal/js/importer.py
17 5 4
fun resultOf()
in src/main/kotlin/io/bazel/worker/WorkerContext.kt
17 2 1
fun execute()
in src/main/kotlin/io/bazel/kotlin/builder/utils/jars/SourceJarExtractor.kt
16 3 0
fun addDirectory()
in src/main/kotlin/io/bazel/kotlin/builder/utils/jars/JarCreator.kt
16 3 1
fun execute()
in src/main/kotlin/io/bazel/kotlin/builder/tasks/js/Kotlin2JsTaskExecutor.kt
16 1 2
fun capture()
in src/main/kotlin/io/bazel/worker/IO.kt
16 1 0
fun printLines()
in src/main/kotlin/io/bazel/kotlin/builder/toolchain/CompilationTaskContext.kt
15 3 4