kubernetes / examples
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 30 units with 328 lines of code in units (5.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 1 simple units (35 lines of code)
    • 29 very simple units (293 lines of code)
0% | 0% | 0% | 10% | 89%
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
go0% | 0% | 0% | 15% | 84%
js0% | 0% | 0% | 0% | 100%
java0% | 0% | 0% | 0% | 100%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cassandra/go0% | 0% | 0% | 72% | 27%
staging/explorer0% | 0% | 0% | 0% | 100%
guestbook-go0% | 0% | 0% | 0% | 100%
guestbook-go/public0% | 0% | 0% | 0% | 100%
cassandra/java0% | 0% | 0% | 0% | 100%
staging/https-nginx0% | 0% | 0% | 0% | 100%
staging/sharing-clusters0% | 0% | 0% | 0% | 100%
staging/cluster-dns0% | 0% | 0% | 0% | 100%
guestbook/php-redis0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func GetEndpoints()
in cassandra/go/main.go
35 7 3
func main()
in staging/explorer/explorer.go
37 4 0
public List getSeeds()
in cassandra/java/src/main/java/io/k8s/cassandra/KubernetesSeedProvider.java
21 3 0
func main()
in staging/https-nginx/make_secret.go
18 3 0
func buildEndpoints()
in cassandra/go/main.go
12 2 1
private static String getEnvOrDefault()
in cassandra/java/src/main/java/io/k8s/cassandra/KubernetesSeedProvider.java
7 2 2
var handleSubmission = function()
in guestbook-go/public/script.js
9 2 1
func EnvHandler()
in guestbook-go/main.go
11 2 2
func HandleError()
in guestbook-go/main.go
6 2 2
func read()
in staging/https-nginx/make_secret.go
7 2 1
func read()
in staging/sharing-clusters/make_secret.go
7 2 1
func main()
in staging/sharing-clusters/make_secret.go
17 2 0
func main()
in cassandra/go/main.go
1 1 0
protected List getFieldOrder()
in cassandra/java/src/main/java/io/k8s/cassandra/GoInterface.java
3 1 0
protected List getFieldOrder()
in cassandra/java/src/main/java/io/k8s/cassandra/GoInterface.java
3 1 0
public KubernetesSeedProvider()
in cassandra/java/src/main/java/io/k8s/cassandra/KubernetesSeedProvider.java
2 1 1
function RedisController()
in guestbook/php-redis/controllers.js
1 1 0
RedisController.prototype.onRedis = function()
in guestbook/php-redis/controllers.js
9 1 0
$()
in guestbook-go/public/script.js
21 1 1
var appendGuestbookEntries = function()
in guestbook-go/public/script.js
6 1 1