facebookexperimental / rust-shed
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,434 units with 13,980 lines of code in units (48.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 19 medium complex units (1,197 lines of code)
    • 70 simple units (1,829 lines of code)
    • 1,345 very simple units (10,954 lines of code)
0% | 0% | 8% | 13% | 78%
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
py0% | 0% | 14% | 26% | 59%
rs0% | 0% | 5% | 4% | 90%
c0% | 0% | 0% | 33% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
build/fbcode_builder0% | 0% | 13% | 26% | 59%
shed/facet0% | 0% | 38% | 15% | 45%
shed/panichandler0% | 0% | 95% | 0% | 4%
shed/futures_01_ext0% | 0% | 0% | 9% | 90%
shed/netstring0% | 0% | 0% | 16% | 83%
shed/async_compression0% | 0% | 0% | 11% | 88%
shed/fbinit0% | 0% | 0% | 81% | 18%
shed/sorted_vector_map0% | 0% | 0% | 0% | 100%
shed/serde_starlark0% | 0% | 0% | 0% | 100%
shed/scuba_sample0% | 0% | 0% | 0% | 100%
shed/slog_glog_fmt0% | 0% | 0% | 0% | 100%
shed/failure_ext0% | 0% | 0% | 0% | 100%
shed/hash_memo0% | 0% | 0% | 0% | 100%
shed/futures_ext0% | 0% | 0% | 0% | 100%
shed/cached_config0% | 0% | 0% | 0% | 100%
shed/stats0% | 0% | 0% | 0% | 100%
shed/sql0% | 0% | 0% | 0% | 100%
shed/quickcheck_arbitrary_derive0% | 0% | 0% | 0% | 100%
shed/chrome_trace0% | 0% | 0% | 0% | 100%
shed/shared_error0% | 0% | 0% | 0% | 100%
shed/futures_stats0% | 0% | 0% | 0% | 100%
shed/ascii_ext0% | 0% | 0% | 0% | 100%
shed/borrowed0% | 0% | 0% | 0% | 100%
shed/time_ext0% | 0% | 0% | 0% | 100%
shed/tokio_shim0% | 0% | 0% | 0% | 100%
shed/perthread0% | 0% | 0% | 0% | 100%
shed/cloned0% | 0% | 0% | 0% | 100%
shed/lock_ext0% | 0% | 0% | 0% | 100%
shed/thrift_compiler0% | 0% | 0% | 0% | 100%
shed/cachelib_stub0% | 0% | 0% | 0% | 100%
shed/tokio-uds-compat0% | 0% | 0% | 0% | 100%
shed/bytes_ext0% | 0% | 0% | 0% | 100%
shed/fbthrift_ext0% | 0% | 0% | 0% | 100%
shed/secure_utils0% | 0% | 0% | 0% | 100%
shed/memcache_stub0% | 0% | 0% | 0% | 100%
shed/trait_alias0% | 0% | 0% | 0% | 100%
shed/services0% | 0% | 0% | 0% | 100%
shed/codegen_includer_proc_macro0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
76 25 4
62 22 1
40 19 2
73 19 2
37 17 5
41 17 1
205 16 5
55 16 4
44 16 3
41 15 2
128 13 3
31 12 3
50 12 4
9 12 2
69 11 2
100 11 1
74 11 3
31 11 4
31 11 2
24 10 3
23 10 4
29 10 3
43 10 2
26 10 6
25 10 3
15 10 3
29 9 2
27 9 2
41 9 1
34 9 3
44 8 1
39 8 3
38 8 2
46 8 2
17 8 2
25 8 1
16 8 2
23 8 3
18 8 3
27 8 3
14 8 5
17 8 3
17 8 2
47 8 2
27 7 1
114 7 5
14 7 2
78 7 0
14 7 2
14 7 4