microsoft / thrifty
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 749 units with 7,105 lines of code in units (54.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (247 lines of code)
    • 19 simple units (657 lines of code)
    • 725 very simple units (6,201 lines of code)
0% | 0% | 3% | 9% | 87%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
kt0% | 0% | 3% | 8% | 88%
java0% | 0% | 8% | 16% | 75%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
thrifty-kotlin-codegen/src/main0% | 0% | 16% | 23% | 59%
thrifty-schema/src/main0% | 0% | 4% | 10% | 85%
thrifty-compiler/src/main0% | 0% | 100% | 0% | 0%
thrifty-gradle-plugin/src/main0% | 0% | 8% | 17% | 74%
thrifty-runtime/src/commonTest0% | 0% | 1% | 20% | 78%
thrifty-runtime/src/commonMain0% | 0% | 0% | 2% | 97%
thrifty-java-codegen/src/main0% | 0% | 0% | 5% | 94%
thrifty-runtime/src/jvmMain0% | 0% | 0% | 30% | 70%
thrifty-compiler-plugins/src/main0% | 0% | 0% | 0% | 100%
thrifty-example-postprocessor/src/main0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
override fun equals()
in thrifty-runtime/src/commonTest/kotlin/com/microsoft/thrifty/protocol/Xtruct.kt
12 21 1
fun recursivelyRenderConstValue()
in thrifty-kotlin-codegen/src/main/kotlin/com/microsoft/thrifty/kgen/KotlinCodeGenerator.kt
98 15 3
private void generateKotlinThrifts()
in thrifty-gradle-plugin/src/main/java/com/microsoft/thrifty/gradle/GenerateThriftSourcesWorkAction.java
43 12 2
override fun validate()
in thrifty-schema/src/main/kotlin/com/microsoft/thrifty/schema/Constant.kt
47 12 3
override fun run()
in thrifty-compiler/src/main/kotlin/com/microsoft/thrifty/compiler/ThriftyCompiler.kt
47 11 0
override fun apply()
in thrifty-schema/src/main/kotlin/com/microsoft/thrifty/schema/FieldNamingPolicy.kt
21 10 1
override fun equals()
in thrifty-schema/src/main/kotlin/com/microsoft/thrifty/schema/Schema.kt
13 10 1
override fun load()
in thrifty-kotlin-codegen/src/main/kotlin/com/microsoft/thrifty/kgen/KotlinCodeGenerator.kt
48 9 1
fun invokeRequest()
in thrifty-runtime/src/commonMain/kotlin/com/microsoft/thrifty/service/ClientBase.kt
47 9 1
override fun read()
in thrifty-runtime/src/commonTest/kotlin/com/microsoft/thrifty/protocol/Xtruct.kt
65 9 2
private void generateJavaThrifts()
in thrifty-gradle-plugin/src/main/java/com/microsoft/thrifty/gradle/GenerateThriftSourcesWorkAction.java
34 8 2
fun generate()
in thrifty-kotlin-codegen/src/main/kotlin/com/microsoft/thrifty/kgen/KotlinCodeGenerator.kt
91 8 1
private void actuallyExecute()
in thrifty-gradle-plugin/src/main/java/com/microsoft/thrifty/gradle/GenerateThriftSourcesWorkAction.java
29 7 0
fun buildServiceInterface()
in thrifty-java-codegen/src/main/kotlin/com/microsoft.thrifty.gen/ServiceBuilder.kt
45 7 1
fun read()
in thrifty-runtime/src/commonTest/kotlin/com/microsoft/thrifty/protocol/BinaryProtocolTest.kt
43 7 1
override fun hashCode()
in thrifty-runtime/src/commonTest/kotlin/com/microsoft/thrifty/protocol/Xtruct.kt
16 7 0
override fun write()
in thrifty-runtime/src/commonTest/kotlin/com/microsoft/thrifty/protocol/Xtruct.kt
35 7 2
override fun close()
in thrifty-runtime/src/jvmMain/kotlin/com/microsoft/thrifty/transport/SocketTransport.kt
24 7 0
private void reportThriftException()
in thrifty-gradle-plugin/src/main/java/com/microsoft/thrifty/gradle/GenerateThriftSourcesWorkAction.java
22 6 1
fun skip()
in thrifty-runtime/src/commonMain/kotlin/com/microsoft/thrifty/util/ProtocolUtil.kt
46 6 2