aws / libfabric
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 5,648 units with 128,801 lines of code in units (65.4% of code).
    • 8 very complex units (2,075 lines of code)
    • 49 complex units (6,921 lines of code)
    • 484 medium complex units (33,074 lines of code)
    • 917 simple units (32,051 lines of code)
    • 4,190 very simple units (54,680 lines of code)
1% | 5% | 25% | 24% | 42%
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
c1% | 5% | 26% | 26% | 40%
h0% | 5% | 20% | 10% | 63%
cpp0% | 13% | 48% | 22% | 15%
py0% | 0% | 0% | 29% | 70%
pl0% | 0% | 0% | 33% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
prov/psm27% | 12% | 37% | 15% | 26%
prov/psm9% | 10% | 31% | 27% | 21%
prov/gni2% | 9% | 24% | 24% | 37%
fabtests/common4% | 2% | 30% | 19% | 43%
prov/bgq0% | 9% | 32% | 20% | 37%
prov/sockets0% | 7% | 32% | 20% | 39%
prov/efa0% | 6% | 27% | 21% | 45%
prov/verbs0% | 5% | 29% | 25% | 39%
fabtests/unit0% | 61% | 0% | 26% | 11%
fabtests/functional0% | 2% | 39% | 34% | 24%
prov/netdir0% | 2% | 22% | 32% | 42%
prov/rxm0% | 2% | 18% | 24% | 54%
util/windows0% | 13% | 48% | 22% | 15%
prov/util0% | 0% | 25% | 30% | 44%
prov/usnic0% | 0% | 21% | 17% | 61%
fabtests/ubertest0% | 0% | 42% | 27% | 30%
src0% | 0% | 16% | 21% | 61%
prov/shm0% | 0% | 21% | 26% | 51%
util0% | 0% | 27% | 40% | 31%
prov/rxd0% | 0% | 12% | 28% | 59%
prov/mrail0% | 0% | 14% | 39% | 46%
fabtests/multinode0% | 0% | 20% | 51% | 28%
fabtests/benchmarks0% | 0% | 27% | 64% | 8%
src/windows0% | 0% | 31% | 39% | 29%
src/unix0% | 0% | 37% | 35% | 27%
prov/rstream0% | 0% | 3% | 34% | 61%
include/windows0% | 0% | 2% | 0% | 97%
prov/tcp0% | 0% | 0% | 39% | 60%
prov/hook0% | 0% | 0% | 12% | 87%
contrib/intel0% | 0% | 0% | 25% | 74%
prov/udp0% | 0% | 0% | 17% | 82%
contrib/cray0% | 0% | 0% | 65% | 34%
config0% | 0% | 0% | 33% | 66%
src/linux0% | 0% | 0% | 14% | 85%
include0% | 0% | 0% | 1% | 98%
include/unix0% | 0% | 0% | 9% | 90%
fabtests/include0% | 0% | 0% | 0% | 100%
include/rdma0% | 0% | 0% | 0% | 100%
fabtests/scripts0% | 0% | 0% | 0% | 100%
include/linux0% | 0% | 0% | 0% | 100%
include/freebsd0% | 0% | 0% | 0% | 100%
src/shared0% | 0% | 0% | 0% | 100%
include/osx0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
int psmx2_cq_poll_mq()
in prov/psm2/src/psmx2_cq.c
466 120 5
static int psmx_getinfo()
in prov/psm/src/psmx_init.c
429 87 6
jsmnerr_t jsmn_parse()
in fabtests/common/jsmn.c
137 69 5
ssize_t _gnix_rma()
in prov/gni/src/gnix_rma.c
190 57 11
ssize_t _gnix_atomic()
in prov/gni/src/gnix_atomic.c
169 55 10
int psmx_cq_poll_mq()
in prov/psm/src/psmx_cq.c
182 55 5
int psmx2_am_rma_handler()
in prov/psm2/src/psmx2_rma.c
292 54 6
DIRECT_FN int gnix_ep_bind()
in prov/gni/src/gnix_ep.c
210 51 3
static int _gnix_ep_getinfo()
in prov/gni/src/gnix_fabric.c
181 48 7
int psmx_am_rma_handler()
in prov/psm/src/psmx_rma.c
228 48 6
int gnix_nic_alloc()
in prov/gni/src/gnix_nic.c
323 47 3
int _gnix_ep_alloc()
in prov/gni/src/gnix_ep.c
204 46 5
int process_mfifo_context()
in prov/bgq/include/rdma/bgq/fi_bgq_rx.h
267 44 7
int psmx2_am_atomic_handler()
in prov/psm2/src/psmx2_atomic.c
205 44 6
static int sock_ep_bind()
in prov/sockets/src/sock_ep.c
133 43 3
int psmx_am_atomic_handler()
in prov/psm/src/psmx_atomic.c
189 41 6
static int __gnix_rndzv_iov_req_build()
in prov/gni/src/gnix_msg.c
326 40 1
STATIC int psmx2_ep_bind()
in prov/psm2/src/psmx2_ep.c
107 39 3
ssize_t psmx2_atomic_compwritev_generic()
in prov/psm2/src/psmx2_atomic.c
169 38 17
static ssize_t psmx2_rma_self()
in prov/psm2/src/psmx2_rma.c
141 38 10