facebookincubator / contest
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 754 units with 9,449 lines of code in units (73.0% of code).
    • 0 very complex units (0 lines of code)
    • 6 complex units (882 lines of code)
    • 30 medium complex units (1,806 lines of code)
    • 59 simple units (1,745 lines of code)
    • 659 very simple units (5,016 lines of code)
0% | 9% | 19% | 18% | 53%
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% | 9% | 19% | 18% | 53%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pkg/runner0% | 48% | 18% | 13% | 19%
plugins/teststeps0% | 9% | 23% | 21% | 45%
cmds/contest0% | 67% | 16% | 0% | 16%
plugins/targetlocker0% | 23% | 18% | 12% | 46%
cmds/clients0% | 57% | 0% | 9% | 32%
plugins/targetmanagers0% | 53% | 0% | 13% | 33%
plugins/storage0% | 0% | 31% | 31% | 37%
pkg/jobmanager0% | 0% | 33% | 25% | 40%
db/rdbms0% | 0% | 52% | 37% | 10%
plugins/listeners0% | 0% | 63% | 0% | 36%
cmds/exec_agent0% | 0% | 32% | 7% | 59%
pkg/xcontext0% | 0% | 5% | 14% | 80%
pkg/transport0% | 0% | 32% | 16% | 51%
tools/migration0% | 0% | 41% | 43% | 14%
cmds/contest-generator0% | 0% | 21% | 23% | 55%
plugins/testfetchers0% | 0% | 32% | 38% | 29%
pkg/lib0% | 0% | 0% | 61% | 38%
plugins/reporters0% | 0% | 0% | 42% | 57%
pkg/job0% | 0% | 0% | 20% | 79%
pkg/config0% | 0% | 0% | 100% | 0%
pkg/api0% | 0% | 0% | 7% | 92%
pkg/pluginregistry0% | 0% | 0% | 0% | 100%
pkg/storage0% | 0% | 0% | 0% | 100%
pkg/event0% | 0% | 0% | 0% | 100%
pkg/logging0% | 0% | 0% | 0% | 100%
pkg/cerrors0% | 0% | 0% | 0% | 100%
pkg/types0% | 0% | 0% | 0% | 100%
pkg/userfunctions0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
236 43 1
167 40 1
159 36 4
115 34 1
113 29 3
92 27 1
119 25 1
90 22 4
103 21 1
74 20 5
90 19 1
54 18 1
104 18 1
80 17 1
57 16 1
81 16 4
56 16 7
61 15 1
68 15 2
63 14 1
37 14 2
64 14 1
38 14 1
56 13 1
55 12 1
52 12 1
37 12 1
38 12 2
31 12 2
46 12 1
40 11 1
50 11 1
32 11 1
38 11 0
39 11 1
53 11 1
42 10 0
28 10 2
20 10 1
39 9 1
19 9 1
60 9 1
35 9 1
23 9 1
40 9 1
39 9 0
39 9 1
33 9 2
33 9 1
35 8 1