kubernetes / perf-tests
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 1,363 units with 16,800 lines of code in units (38.6% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (209 lines of code)
    • 45 medium complex units (2,074 lines of code)
    • 168 simple units (4,699 lines of code)
    • 1,148 very simple units (9,818 lines of code)
0% | 1% | 12% | 27% | 58%
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% | 1% | 12% | 27% | 58%
py0% | 0% | 20% | 25% | 54%
js0% | 0% | 0% | 43% | 56%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
clusterloader2/cmd0% | 38% | 14% | 6% | 40%
compare/src0% | 14% | 20% | 31% | 34%
clusterloader2/pkg0% | 0% | 13% | 26% | 60%
perfdash0% | 0% | 16% | 38% | 45%
dns/py0% | 0% | 23% | 20% | 56%
network/benchmarks0% | 0% | 6% | 45% | 48%
util-images/network0% | 0% | 10% | 18% | 71%
verify/boilerplate0% | 0% | 35% | 32% | 31%
verify0% | 0% | 17% | 59% | 23%
perfdash/www0% | 0% | 0% | 43% | 56%
clusterloader2/api0% | 0% | 0% | 41% | 58%
benchmark/pkg0% | 0% | 0% | 28% | 71%
slo-monitor/src0% | 0% | 0% | 21% | 78%
dns/dnsperfgo0% | 0% | 0% | 40% | 59%
dns/jsonify0% | 0% | 0% | 31% | 68%
benchmark/cmd0% | 0% | 0% | 33% | 66%
util-images/probes0% | 0% | 0% | 0% | 100%
util-images/access-tokens0% | 0% | 0% | 0% | 100%
util-images/sleep0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func main()
in clusterloader2/cmd/clusterloader.go
118 33 0
func main()
in compare/src/main/result-comparator.go
91 26 0
func()
in clusterloader2/pkg/prometheus/prometheus.go
63 23 1
func WaitForPods()
in clusterloader2/pkg/measurement/util/wait_for_pods.go
55 20 3
func NewResourceUsageGatherer()
in clusterloader2/pkg/measurement/util/gatherers/container_resource_gatherer.go
73 18 6
func()
in clusterloader2/pkg/measurement/common/resource_usage.go
73 17 1
func ProcessSingleTest()
in compare/src/scraper.go
66 17 2
func ComputePodsStartupStatus()
in clusterloader2/pkg/measurement/util/pods.go
49 16 3
func()
in perfdash/metrics-downloader.go
48 16 1
func allocateWorkToClient()
in network/benchmarks/netperf/nptest/nptest.go
53 15 2
func WaitForPVs()
in clusterloader2/pkg/measurement/util/wait_for_pvs.go
46 15 3
func()
in clusterloader2/pkg/measurement/common/wait_for_controlled_pods.go
65 15 1
func WaitForPVCs()
in clusterloader2/pkg/measurement/util/wait_for_pvcs.go
42 14 3
func GetReplicasFromRuntimeObject()
in clusterloader2/pkg/measurement/util/runtimeobjects/runtimeobjects.go
38 14 2
func()
in clusterloader2/pkg/measurement/common/wait_for_controlled_pods.go
75 14 1
func()
in clusterloader2/pkg/measurement/common/metrics/metrics_grabber.go
56 14 1
def _wait_for_status()
in dns/py/runner.py
35 14 2
func parseIperfResponse()
in util-images/network/netperfbenchmark/pkg/worker/util.go
39 13 5
func GetOneTimeResourceUsageOnNode()
in clusterloader2/pkg/measurement/util/kubelet/kubelet.go
45 13 4
func()
in clusterloader2/pkg/measurement/common/service_creation_latency.go
33 13 1