Ktor
Conditional Complexity

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 1,742 units with 13,781 lines of code in units (19.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (272 lines of code)
    • 46 simple units (1,253 lines of code)
    • 1,692 very simple units (12,256 lines of code)
0% | 0% | 1% | 9% | 88%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
kt0% | 0% | 1% | 9% | 88%
Legend:
51+
26-50
11-25
6-10
1-5
Conditional Complexity per Logical Component
primary logical decomposition
ktor-http0% | 0% | 8% | 13% | 77%
ktor-server0% | 0% | 3% | 10% | 86%
ktor-io0% | 0% | 1% | 5% | 93%
ktor-client0% | 0% | 0% | 10% | 89%
ktor-utils0% | 0% | 0% | 10% | 89%
ktor-features0% | 0% | 0% | 7% | 92%
ktor-network0% | 0% | 0% | 10% | 89%
Legend:
51+
26-50
11-25
6-10
1-5
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
public fun commandLineEnvironment()
in ktor-server/ktor-server-host-common/jvm/src/io/ktor/server/engine/CommandLine.kt
106 15 1
public suspend fun decodeChunked()
in ktor-http/ktor-http-cio/common/src/io/ktor/http/cio/ChunkedTransferEncoding.kt
44 15 3
public fun parseBoundary()
in ktor-http/ktor-http-cio/jvm/src/io/ktor/http/cio/Multipart.kt
67 13 1
public suspend fun decodeUTF8LineLoopSuspend()
in ktor-io/common/src/io/ktor/utils/io/core/internal/UTF8.kt
55 11 3
public fun expectHttpUpgrade()
in ktor-http/ktor-http-cio/common/src/io/ktor/http/cio/HttpBody.kt
28 10 3
override fun install()
in ktor-client/ktor-client-features/ktor-client-logging/common/src/io/ktor/client/features/logging/Logging.kt
55 10 2
override fun install()
in ktor-server/ktor-server-core/jvm/src/io/ktor/features/DoubleReceive.kt
48 9 2
public suspend fun intercept()
in ktor-server/ktor-server-core/jvm/src/io/ktor/features/CORS.kt
28 9 1
override fun handle()
in ktor-server/ktor-server-jetty/jvm/src/io/ktor/server/jetty/JettyKtorHandler.kt
46 9 4
override fun getEngineHeaderValues()
in ktor-server/ktor-server-cio/jvm/src/io/ktor/server/cio/CIOApplicationResponse.kt
30 9 1
override suspend fun lookAheadSuspend()
in ktor-io/jvm/src/io/ktor/utils/io/ByteBufferChannel.kt
26 9 1
override fun install()
in ktor-server/ktor-server-core/jvm/src/io/ktor/features/ContentNegotiation.kt
62 8 2
override fun evaluate()
in ktor-server/ktor-server-core/jvm/src/io/ktor/routing/HostsRoutingBuilder.kt
19 8 2
override suspend fun verifyNonce()
in ktor-utils/jvm/src/io/ktor/util/StatelessHmacNonceManager.kt
21 8 1
override suspend fun loop()
in ktor-io/jvm/src/io/ktor/utils/io/jvm/javaio/Blocking.kt
22 8 0
override fun close()
in ktor-io/jvm/src/io/ktor/utils/io/ByteBufferChannel.kt
21 8 1
override suspend fun read()
in ktor-io/jvm/src/io/ktor/utils/io/ByteBufferChannel.kt
21 8 2
public suspend fun parseRequest()
in ktor-http/ktor-http-cio/common/src/io/ktor/http/cio/HttpParser.kt
28 8 1
public fun expectHttpBody()
in ktor-http/ktor-http-cio/common/src/io/ktor/http/cio/HttpBody.kt
14 8 5
override fun equals()
in ktor-http/ktor-http-cio/common/src/io/ktor/http/cio/ConnectionOptions.kt
10 8 1
override fun invoke()
in ktor-client/ktor-client-ios/darwin/src/io/ktor/client/engine/ios/certificates/CertificatePinner.kt
57 8 5
override fun install()
in ktor-client/ktor-client-core/common/src/io/ktor/client/features/cache/HttpCache.kt
34 8 2
override fun install()
in ktor-server/ktor-server-core/jvm/src/io/ktor/features/OriginConnectionPoint.kt
37 7 2
public fun merge()
in ktor-utils/common/src/io/ktor/util/pipeline/Pipeline.kt
39 7 1
override suspend fun readPacket()
in ktor-io/jvm/src/io/ktor/utils/io/ByteBufferChannel.kt
30 7 2
public fun match()
in ktor-http/common/src/io/ktor/http/ContentTypes.kt
29 7 1
public fun parse()
in ktor-http/common/src/io/ktor/http/ContentTypes.kt
21 7 1
override suspend fun execute()
in ktor-client/ktor-client-android/jvm/src/io/ktor/client/engine/android/AndroidClientEngine.kt
47 7 1
protected fun applyInterest()
in ktor-network/jvm/src/io/ktor/network/selector/SelectorManagerSupport.kt
22 6 2
public fun addLast()
in ktor-network/jvm/src/io/ktor/network/selector/LockFreeMPSCQueue.kt
18 6 1
public fun removeFirstOrNull()
in ktor-network/jvm/src/io/ktor/network/selector/LockFreeMPSCQueue.kt
20 6 0
override fun install()
in ktor-server/ktor-server-core/jvm/src/io/ktor/features/CallId.kt
38 6 2
override fun service()
in ktor-server/ktor-server-servlet/jvm/src/io/ktor/server/servlet/KtorServlet.kt
18 6 2
protected fun commitHeaders()
in ktor-server/ktor-server-host-common/jvm/src/io/ktor/server/engine/BaseApplicationResponse.kt
46 6 1
public fun addLast()
in ktor-utils/posix/src/io/ktor/util/collections/LockFreeMPSCQueueNative.kt
18 6 1
public fun removeFirstOrNull()
in ktor-utils/posix/src/io/ktor/util/collections/LockFreeMPSCQueueNative.kt
20 6 0
override fun run()
in ktor-features/ktor-server-sessions/jvm/src/io/ktor/sessions/Cache.kt
19 6 0
public fun interceptPipeline()
in ktor-features/ktor-auth/jvm/src/io/ktor/auth/Authentication.kt
45 6 2
fun tryLockForRelease()
in ktor-io/jvm/src/io/ktor/utils/io/internal/RingBufferCapacity.kt
8 6 0
override suspend fun readAvailable()
in ktor-io/jvm/src/io/ktor/utils/io/ByteBufferChannel.kt
11 6 3
override suspend fun readAvailable()
in ktor-io/jvm/src/io/ktor/utils/io/ByteBufferChannel.kt
11 6 1
override suspend fun readAvailable()
in ktor-io/jvm/src/io/ktor/utils/io/ByteBufferChannel.kt
11 6 1
override fun writeAvailable()
in ktor-io/jvm/src/io/ktor/utils/io/ByteBufferChannel.kt
24 6 2
override fun request()
in ktor-io/jvm/src/io/ktor/utils/io/ByteBufferChannel.kt
16 6 2
override suspend fun consumeEachBufferRange()
in ktor-io/jvm/src/io/ktor/utils/io/ByteChannelSequentialJVM.kt
17 6 1
public suspend fun withTimeout()
in ktor-http/ktor-http-cio/jvm/src/io/ktor/http/cio/internals/WeakTimeoutQueue.kt
24 6 1
public fun parseRangesSpecifier()
in ktor-http/common/src/io/ktor/http/Ranges.kt
23 6 1
override fun produceContent()
in ktor-client/ktor-client-apache/jvm/src/io/ktor/client/engine/apache/ApacheRequestProducer.kt
31 6 2
override fun install()
in ktor-client/ktor-client-core/common/src/io/ktor/client/features/HttpPlainText.kt
18 6 2
public fun mergeHeaders()
in ktor-client/ktor-client-core/common/src/io/ktor/client/engine/Utils.kt
22 6 4