microsoft / ADBench
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,584 units with 19,854 lines of code in units (16.7% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (145 lines of code)
    • 18 medium complex units (1,236 lines of code)
    • 80 simple units (3,266 lines of code)
    • 1,485 very simple units (15,207 lines of code)
0% | <1% | 6% | 16% | 76%
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
jl0% | 7% | 0% | 18% | 73%
cpp0% | 0% | 8% | 25% | 66%
c0% | 0% | 9% | 20% | 69%
py0% | 0% | 4% | 8% | 86%
cs0% | 0% | 14% | 23% | 61%
h0% | 0% | 3% | 7% | 88%
m0% | 0% | 0% | <1% | 99%
cxx0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
usr0% | 31% | 0% | 19% | 48%
src0% | 0% | 6% | 18% | 75%
tools0% | 0% | 4% | 12% | 82%
ADBench0% | 0% | 25% | 15% | 59%
data0% | 0% | 0% | 37% | 62%
submodules0% | 0% | 0% | <1% | 99%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
jl
function awfrdiff()
in usr/awf/Julia/awfrdiff.jl
145 32 6
def generate_graph()
in ADBench/plot_graphs.py
96 20 4
double compute_hand_J()
in tools/ADOLC/main.cpp
76 18 7
void showStackAndBuffers()
in src/cpp/modules/tapenade/utils/adBuffer.c
64 17 1
void showpushpopsequence_()
in src/cpp/modules/tapenade/utils/adStack.c
43 17 5
void read_hand_model()
in src/cpp/shared/utils.cpp
93 16 2
void read_hand_model()
in src/cpp/shared/utils.cpp
92 15 2
void get_hand_nnz_pattern()
in tools/ADOLC/main.cpp
67 14 4
public string ToJsonString()
in src/dotnet/utils/JacobianComparisonLib/JacobianComparison.cs
113 13 0
def vals_by_tool()
in ADBench/plot_graphs.py
28 12 4
void rodrigues_rotate_point_b()
in src/cpp/modules/tapenade/ba/ba_b.c
79 12 6
void gmm_objective_b()
in src/cpp/modules/tapenade/gmm/gmm_b.c
99 12 13
void lstm_objective_b()
in src/cpp/modules/tapenade/lstm/lstm_b.c
74 12 11
void read_gmm_instance()
in src/cpp/shared/utils.cpp
63 12 10
def main()
in src/python/runner/main.py
46 12 1
void read_hand_model()
in tools/Adept/utils_vxl.h
75 12 2
void showBufferRepeatsRec()
in src/cpp/modules/tapenade/utils/adBuffer.c
32 11 2
void pushNArray()
in src/cpp/modules/tapenade/utils/adStack.c
47 11 3
int main()
in src/cpp/runner/main.cpp
49 11 2
def generate()
in data/gmm/gmm-data-gen.py
33 10 5