microsoft / lagscope
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 41 units with 1,160 lines of code in units (75.2% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (377 lines of code)
    • 4 medium complex units (315 lines of code)
    • 4 simple units (104 lines of code)
    • 30 very simple units (364 lines of code)
0% | 32% | 27% | 8% | 31%
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
c0% | 33% | 27% | 9% | 29%
h0% | 0% | 0% | 0% | 100%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 32% | 27% | 8% | 31%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
218 34 1
int verify_args()
in src/util.c
73 30 1
86 27 3
101 17 1
void print_flags()
in src/util.c
49 16 1
105 13 1
int main()
in src/main.c
60 11 2
int show_histogram()
in src/latencies_stats.c
41 10 4
int getopt2()
in src/util.c
25 10 3
int n_read()
in src/tcpstream.c
19 6 3
int n_write()
in src/tcpstream.c
19 6 3
void create_freq_table_json()
in src/latencies_stats.c
26 5 2
int process_latencies()
in src/latencies_stats.c
16 4 1
18 4 3
static int vasprintf()
in src/win_utils.c
16 4 3
void sig_handler()
in src/controller.c
10 3 1
static int get_percentile_latency()
in src/latencies_stats.c
17 3 3
void create_latencies_csv()
in src/latencies_stats.c
18 3 1
void latencies_stats_cleanup()
in src/latencies_stats.c
13 3 1
void run_test_timer()
in src/lin_utils.c
16 3 1