microsoft / WAFBench
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 166 units with 4,136 lines of code in units (1.6% of code).
    • 4 very complex units (1,344 lines of code)
    • 1 complex units (122 lines of code)
    • 11 medium complex units (680 lines of code)
    • 25 simple units (772 lines of code)
    • 125 very simple units (1,218 lines of code)
32% | 2% | 16% | 18% | 29%
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
c51% | 4% | 18% | 9% | 15%
py0% | 0% | 12% | 34% | 53%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
wb51% | 4% | 18% | 9% | 15%
ftw_compatible_tool0% | 0% | 10% | 31% | 58%
pywb0% | 0% | 20% | 29% | 50%
tools0% | 0% | 0% | 71% | 28%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
int main()
in wb/wb.c
541 142 2
269 69 1
219 57 1
315 57 1
122 28 1
61 24 2
134 23 1
67 19 1
def _convert()
in pywb/ftwhelper.py
55 17 2
84 17 1
def _load_packets_from_pkt_files()
in pywb/packetsloader.py
38 15 1
def _print_check_result()
in ftw_compatible_tool/user_interface.py
37 14 3
def _report_experiment()
in ftw_compatible_tool/base.py
57 13 1
51 12 2
43 12 1
53 11 1
def publish()
in ftw_compatible_tool/broker.py
24 10 4
def interact()
in ftw_compatible_tool/user_interface.py
40 10 1
def parse()
in pywb/optionparser.py
38 10 2
def find_paranoia_level_line()
in tools/paranoia_level_classifier.py
20 10 2