facebook / bistro
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,425 units with 17,835 lines of code in units (62.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 60 medium complex units (3,660 lines of code)
    • 136 simple units (4,250 lines of code)
    • 1,229 very simple units (9,925 lines of code)
0% | 0% | 20% | 23% | 55%
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
cpp0% | 0% | 33% | 24% | 41%
py0% | 0% | 13% | 28% | 58%
php0% | 0% | 13% | 20% | 65%
h0% | 0% | 5% | 9% | 84%
c0% | 0% | 0% | 33% | 66%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
build/fbcode_builder0% | 0% | 13% | 26% | 59%
web_ui/src0% | 0% | 13% | 20% | 65%
bistro/processes0% | 0% | 49% | 7% | 43%
bistro/runners0% | 0% | 46% | 16% | 37%
bistro/cron0% | 0% | 31% | 13% | 55%
bistro/scheduler0% | 0% | 43% | 30% | 25%
bistro/remote0% | 0% | 17% | 38% | 44%
bistro/thrift0% | 0% | 73% | 14% | 11%
bistro/server0% | 0% | 17% | 42% | 39%
bistro0% | 0% | 90% | 0% | 9%
bistro/worker0% | 0% | 19% | 35% | 45%
bistro/utils0% | 0% | 18% | 25% | 56%
bistro/config0% | 0% | 14% | 20% | 65%
bistro/monitor0% | 0% | 66% | 0% | 33%
bistro/statuses0% | 0% | 14% | 29% | 55%
bistro/nodes0% | 0% | 28% | 9% | 61%
bistro/physical0% | 0% | 12% | 14% | 73%
bistro/cmake0% | 0% | 0% | 91% | 8%
bistro/sqlite0% | 0% | 0% | 0% | 100%
bistro/py0% | 0% | 0% | 0% | 100%
web_ui/rsrc0% | 0% | 0% | 0% | 100%
bistro/benchmark0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
120 25 1
76 25 4
28 24 1
88 23 6
95 22 7
62 22 1
81 20 2
58 20 1
51 20 1
72 19 2
109 19 1
40 19 2
73 19 2
70 17 1
82 17 7
75 17 1
107 17 7
60 17 3
37 17 5
41 17 1
76 16 0
120 16 4
91 16 5
80 16 0
73 16 1
55 16 4
44 16 3
53 15 2
70 15 2
145 15 5
18 15 1
41 15 2
59 14 2
56 14 1
75 14 9
45 13 2
53 13 2
69 13 2
27 13 1
128 13 3
43 12 3
34 12 0
93 12 9
33 12 5
51 12 1
31 12 3
50 12 4
9 12 2
10 11 2
30 11 1