golang / perf
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 260 units with 4,256 lines of code in units (76.1% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (241 lines of code)
    • 25 medium complex units (1,179 lines of code)
    • 38 simple units (1,079 lines of code)
    • 194 very simple units (1,757 lines of code)
0% | 5% | 27% | 25% | 41%
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% | 5% | 27% | 25% | 41%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
benchstat0% | 13% | 41% | 13% | 31%
internal/stats0% | 7% | 18% | 22% | 51%
storage/db0% | 11% | 5% | 57% | 25%
analysis/app0% | 0% | 47% | 19% | 32%
storage/benchfmt0% | 0% | 47% | 0% | 52%
storage/cmd0% | 0% | 60% | 0% | 39%
cmd/benchsave0% | 0% | 37% | 24% | 38%
cmd/benchstat0% | 0% | 89% | 0% | 10%
storage/query0% | 0% | 100% | 0% | 0%
storage/app0% | 0% | 0% | 84% | 15%
storage0% | 0% | 0% | 28% | 71%
internal/diff0% | 0% | 0% | 66% | 33%
storage/appengine0% | 0% | 0% | 20% | 80%
internal/basedir0% | 0% | 0% | 54% | 45%
storage/fs0% | 0% | 0% | 0% | 100%
analysis/appengine0% | 0% | 0% | 0% | 100%
analysis/localperf0% | 0% | 0% | 0% | 100%
storage/localperfdata0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in storage/db/query.go
70 28 1
func MannWhitneyUTest()
in internal/stats/utest.go
80 27 3
func()
in benchstat/table.go
91 26 1
func NewScaler()
in benchstat/scaler.go
54 22 2
func FormatText()
in benchstat/text.go
56 20 2
func()
in analysis/app/compare.go
61 17 1
func()
in internal/stats/sample.go
41 17 1
func main()
in storage/cmd/reindex/reindex.go
60 16 0
func tableToJS()
in analysis/app/trend.go
63 16 2
func main()
in cmd/benchsave/benchsave.go
59 15 0
func()
in analysis/app/trend.go
88 15 1
func makeUmemo()
in internal/stats/udist.go
61 15 3
func parseQueryString()
in analysis/app/parse.go
46 14 1
func InvCDF()
in internal/stats/dist.go
56 14 1
func main()
in cmd/benchstat/main.go
53 13 0
func SplitWords()
in storage/query/query.go
39 13 1
func parseKeyValueLine()
in storage/benchfmt/benchfmt.go
27 13 1
func()
in storage/db/query.go
32 12 1
func()
in analysis/app/compare.go
38 12 1
func bisect()
in internal/stats/alg.go
29 12 1