facebookresearch / Hanabi_SPARTA
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 507 units with 6,173 lines of code in units (67.6% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (201 lines of code)
    • 29 medium complex units (1,313 lines of code)
    • 68 simple units (1,607 lines of code)
    • 408 very simple units (3,052 lines of code)
0% | 3% | 21% | 26% | 49%
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% | 3% | 24% | 27% | 43%
h0% | 0% | 9% | 19% | 70%
py0% | 0% | 0% | 80% | 20%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
csrc0% | 3% | 22% | 26% | 46%
ROOT0% | 0% | 0% | 100% | 0%
webapp0% | 0% | 0% | 59% | 40%
webapp/src0% | 0% | 0% | 0% | 100%
webapp/src/components0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
cc
void CardKnowledge::update()
in csrc/HolmesBot.cc
84 45 2
cc
Move SearchBot::doSearch_()
in csrc/SearchBot.cc
117 31 11
62 25 2
cc
void pleaseMakeMove()
in csrc/InfoBot.cc
85 24 1
52 23 3
72 23 1
84 20 1
51 20 5
64 19 6
41 16 1
cc
32 16 1
54 15 2
cc
void get_hint()
in csrc/InfoBot.cc
70 14 1
cc
void JointSearchBot::updateFrames_()
in csrc/JointSearchBot.cc
80 13 2
32 13 3
36 13 5
cc
static std::string nth()
in csrc/HanabiServer.cc
25 12 2
cc
void Server::pleaseGiveValueHint()
in csrc/HanabiServer.cc
45 12 2
20 12 1
19 12 1