apple / servicetalk
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 9,779 units with 61,314 lines of code in units (62.5% of code).
    • 2 very complex units (341 lines of code)
    • 8 complex units (1,033 lines of code)
    • 83 medium complex units (3,650 lines of code)
    • 274 simple units (6,600 lines of code)
    • 9,412 very simple units (49,690 lines of code)
<1% | 1% | 5% | 10% | 81%
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
java<1% | 1% | 6% | 10% | 80%
groovy0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
servicetalk-concurrent-api1% | 1% | 9% | 10% | 77%
servicetalk-http-api1% | 2% | 4% | 10% | 81%
servicetalk-http-utils0% | 17% | 13% | 5% | 63%
servicetalk-http-netty0% | 2% | 6% | 16% | 74%
servicetalk-http-router-jersey0% | 2% | 1% | 8% | 87%
servicetalk-buffer-api0% | 4% | 1% | 9% | 84%
servicetalk-transport-netty-internal0% | 0% | 4% | 12% | 83%
servicetalk-loadbalancer0% | 0% | 37% | 11% | 51%
servicetalk-grpc-protoc0% | 0% | 18% | 11% | 70%
servicetalk-data-jackson0% | 0% | 19% | 9% | 70%
servicetalk-utils-internal0% | 0% | 21% | 6% | 72%
servicetalk-serialization-api0% | 0% | 25% | 0% | 74%
servicetalk-concurrent-internal0% | 0% | 7% | 21% | 70%
servicetalk-grpc-protobuf0% | 0% | 24% | 0% | 75%
servicetalk-concurrent-api-internal0% | 0% | 23% | 36% | 40%
servicetalk-encoding-api-internal0% | 0% | 27% | 18% | 54%
servicetalk-client-api0% | 0% | 10% | 0% | 89%
servicetalk-opentracing-inmemory0% | 0% | 5% | 15% | 78%
servicetalk-encoding-netty0% | 0% | 0% | 45% | 54%
servicetalk-tcp-netty-internal0% | 0% | 0% | 21% | 78%
servicetalk-opentracing-zipkin-publisher0% | 0% | 0% | 34% | 65%
servicetalk-dns-discovery-netty0% | 0% | 0% | 15% | 84%
servicetalk-grpc-api0% | 0% | 0% | 3% | 96%
servicetalk-client-api-internal0% | 0% | 0% | 17% | 82%
servicetalk-serializer-utils0% | 0% | 0% | 27% | 72%
servicetalk-grpc-internal0% | 0% | 0% | 95% | 4%
servicetalk-logging-slf4j-internal0% | 0% | 0% | 16% | 83%
servicetalk-opentracing-log4j20% | 0% | 0% | 38% | 61%
servicetalk-data-jackson-jersey0% | 0% | 0% | 10% | 89%
servicetalk-buffer-netty0% | 0% | 0% | 1% | 98%
servicetalk-benchmarks0% | 0% | 0% | 3% | 96%
servicetalk-opentracing-internal0% | 0% | 0% | 30% | 69%
servicetalk-transport-api0% | 0% | 0% | 1% | 98%
servicetalk-gradle-plugin-internal0% | 0% | 0% | 0% | 100%
servicetalk-grpc-netty0% | 0% | 0% | 0% | 100%
servicetalk-http-router-predicate0% | 0% | 0% | 0% | 100%
servicetalk-grpc-utils0% | 0% | 0% | 0% | 100%
servicetalk-log4j2-mdc-utils0% | 0% | 0% | 0% | 100%
servicetalk-opentracing-http0% | 0% | 0% | 0% | 100%
servicetalk-encoding-api0% | 0% | 0% | 0% | 100%
servicetalk-data-protobuf0% | 0% | 0% | 0% | 100%
servicetalk-http-security-jersey0% | 0% | 0% | 0% | 100%
servicetalk-http-router-jersey-internal0% | 0% | 0% | 0% | 100%
servicetalk-router-utils-internal0% | 0% | 0% | 0% | 100%
servicetalk-context-api0% | 0% | 0% | 0% | 100%
servicetalk-serializer-api0% | 0% | 0% | 0% | 100%
servicetalk-concurrent-jdkflow0% | 0% | 0% | 0% | 100%
servicetalk-concurrent-reactivestreams0% | 0% | 0% | 0% | 100%
servicetalk-concurrent0% | 0% | 0% | 0% | 100%
servicetalk-opentracing-asynccontext0% | 0% | 0% | 0% | 100%
servicetalk-transport-netty0% | 0% | 0% | 0% | 100%
servicetalk-oio-api-internal0% | 0% | 0% | 0% | 100%
servicetalk-opentracing-inmemory-api0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private CopyContextMap removeAll()
in servicetalk-concurrent-api/src/main/java/io/servicetalk/concurrent/api/CopyOnWriteContextMap.java
213 64 1
private static HttpResponseStatus valueOf()
in servicetalk-http-api/src/main/java/io/servicetalk/http/api/HttpResponseStatus.java
128 62 1
static int hashCodeAscii()
in servicetalk-buffer-api/src/main/java/io/servicetalk/buffer/api/AsciiBuffer.java
76 41 1
protected abstract T createMessage()
in servicetalk-http-netty/src/main/java/io/servicetalk/http/netty/HttpObjectDecoder.java
173 40 7
public void onSuccess()
in servicetalk-http-utils/src/main/java/io/servicetalk/http/utils/BeforeFinallyHttpOperator.java
215 40 1
static HttpSetCookie parseSetCookie()
in servicetalk-http-api/src/main/java/io/servicetalk/http/api/DefaultHttpSetCookie.java
151 39 4
private void runTest()
in servicetalk-http-router-jersey/src/testFixtures/java/io/servicetalk/http/router/jersey/ExecutionStrategyTest.java
96 35 0
private CopyContextMap removeBelowSeven()
in servicetalk-concurrent-api/src/main/java/io/servicetalk/concurrent/api/CopyOnWriteContextMap.java
125 34 1
static boolean isValidIpV6Address()
in servicetalk-http-api/src/main/java/io/servicetalk/http/api/NetUtils.java
95 33 1
private CopyContextMap removeAll()
in servicetalk-concurrent-api/src/main/java/io/servicetalk/concurrent/api/CopyOnWriteContextMap.java
102 32 1
static
in servicetalk-utils-internal/src/main/java/io/servicetalk/utils/internal/PlatformDependent0.java
90 25 0
private static MethodSpec newRpcMethodSpec()
in servicetalk-grpc-protoc/src/main/java/io/servicetalk/grpc/protoc/Generator.java
101 24 8
private static String buildEffectiveRequestUri()
in servicetalk-http-utils/src/main/java/io/servicetalk/http/utils/HttpRequestUriUtils.java
61 22 8
private void tryDrainIterator()
in servicetalk-concurrent-api/src/main/java/io/servicetalk/concurrent/api/PublisherConcatMapIterable.java
70 21 1
public void write()
in servicetalk-http-netty/src/main/java/io/servicetalk/http/netty/HttpObjectEncoder.java
81 21 3
public T putIfAbsent()
in servicetalk-concurrent-api/src/main/java/io/servicetalk/concurrent/api/CopyOnWriteContextMap.java
56 20 4
public T computeIfAbsent()
in servicetalk-concurrent-api/src/main/java/io/servicetalk/concurrent/api/CopyOnWriteContextMap.java
64 20 5
public void request()
in servicetalk-concurrent-api/src/main/java/io/servicetalk/concurrent/api/SingleConcatWithPublisher.java
57 19 1
public Iterable deserialize()
in servicetalk-grpc-protobuf/src/main/java/io/servicetalk/grpc/protobuf/ProtoBufSerializationProvider.java
71 18 1
static Http2Headers h1HeadersToH2Headers()
in servicetalk-http-netty/src/main/java/io/servicetalk/http/netty/H2ToStH1Utils.java
62 18 1