pytorch / tensorpipe
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 981 units with 11,225 lines of code in units (52.5% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (212 lines of code)
    • 14 medium complex units (991 lines of code)
    • 40 simple units (1,548 lines of code)
    • 926 very simple units (8,474 lines of code)
0% | 1% | 8% | 13% | 75%
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
cc0% | 2% | 10% | 16% | 69%
h0% | 0% | 2% | 3% | 93%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tensorpipe/benchmark0% | 20% | 26% | 2% | 50%
tensorpipe/channel0% | 0% | 7% | 17% | 75%
tensorpipe/transport0% | 0% | 9% | 21% | 69%
tensorpipe/core0% | 0% | 8% | 10% | 81%
tensorpipe/common0% | 0% | 3% | 8% | 87%
tensorpipe/python0% | 0% | 0% | 0% | 100%
tensorpipe/misc0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
cc
static void clientPingPongNonBlock()
in tensorpipe/benchmark/benchmark_pipe.cc
212 30 6
cc
struct Options parseOptions()
in tensorpipe/benchmark/options.cc
104 21 2
cc
void ChannelImpl::advanceChunkRecvOperation()
in tensorpipe/channel/cuda_basic/channel_impl.cc
91 21 2
cc
std::tuple lookupAddrLikeNccl()
in tensorpipe/transport/uv/utility.cc
64 20 1
cc
std::shared_ptr ContextImpl::create()
in tensorpipe/channel/cma/context_impl.cc
104 18 0
cc
void ChannelImpl::advanceChunkSendOperation()
in tensorpipe/channel/cuda_basic/channel_impl.cc
78 17 2
cc
static void serverPongPingNonBlock()
in tensorpipe/benchmark/benchmark_pipe.cc
165 16 6
cc
Sockaddr Sockaddr::createInetSockAddr()
in tensorpipe/transport/ibv/sockaddr.cc
63 16 1
cc
Sockaddr Sockaddr::createInetSockAddr()
in tensorpipe/transport/uv/sockaddr.cc
49 15 1
cc
void PipeImpl::advanceWriteOperation()
in tensorpipe/core/pipe_impl.cc
54 15 2
cc
void PipeImpl::advanceReadOperation()
in tensorpipe/core/pipe_impl.cc
64 14 2
cc
bool Reactor::pollOnce()
in tensorpipe/transport/ibv/reactor.cc
66 12 0
inline bool isValidUuid()
in tensorpipe/common/strings.h
18 12 1
size_t RingbufferReadOperation::handleRead()
in tensorpipe/common/ringbuffer_read_write_ops.h
47 11 1
cc
std::string EpollLoop::formatEpollEvents()
in tensorpipe/common/epoll_loop.cc
24 11 1
cc
void ChannelImpl::advanceSendOperation()
in tensorpipe/channel/cuda_gdr/channel_impl.cc
51 10 2
cc
void ChannelImpl::advanceRecvOperation()
in tensorpipe/channel/cuda_gdr/channel_impl.cc
51 10 2
cc
bool IbvNic::pollOnce()
in tensorpipe/channel/cuda_gdr/context_impl.cc
53 10 0
cc
std::shared_ptr ContextImpl::create()
in tensorpipe/channel/cuda_gdr/context_impl.cc
56 10 1
cc
std::tuple lookupAddrForHostname()
in tensorpipe/transport/ibv/utility.cc
37 9 0