microsoft / diskspd-for-linux
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 125 units with 1,907 lines of code in units (57.8% of code).
    • 1 very complex units (235 lines of code)
    • 3 complex units (616 lines of code)
    • 3 medium complex units (181 lines of code)
    • 5 simple units (141 lines of code)
    • 113 very simple units (734 lines of code)
12% | 32% | 9% | 7% | 38%
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
cc14% | 36% | 10% | 7% | 30%
h0% | 0% | 0% | 7% | 92%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src12% | 32% | 9% | 7% | 38%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
235 56 2
bool Job::run_job()
in src/job.cc
237 47 0
187 40 0
192 34 1
void ResultFormatterText::print_iops()
in src/result_formatter.cc
86 20 2
29 12 2
66 12 1
34 10 1
24 8 1
int submit()
in src/kernel_aio.cc
36 6 1
bool arg_to_number()
in src/options.h
19 6 3
int submit()
in src/posix_aio.cc
28 6 1
9 5 1
15 5 2
30 5 2
std::shared_ptr wait()
in src/posix_aio.cc
26 5 1
25 5 1
T GetPercentile()
in src/Histogram.h
18 4 1
void IoBucketizer::Merge()
in src/IoBucketizer.cc
15 4 1
std::shared_ptr wait()
in src/kernel_aio.cc
23 4 1