firecracker-microvm / micro-http
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 93 units with 2,233 lines of code in units (62.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 1 simple units (78 lines of code)
    • 92 very simple units (2,155 lines of code)
0% | 0% | 0% | 3% | 96%
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
rs0% | 0% | 0% | 3% | 96%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 0% | 0% | 4% | 95%
src/common0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
fn parse_headers()
in src/connection.rs
78 8 3
fn parse_request_line()
in src/connection.rs
36 5 3
fn parse_body()
in src/connection.rs
46 5 3
fn shift_buffer_left()
in src/connection.rs
22 5 3
fn eq()
in src/request.rs
6 4 2
fn write_allow_header()
in src/response.rs
15 4 2
fn read()
in src/server.rs
40 4 1
fn read_bytes()
in src/connection.rs
13 3 1
fn parse_request_line()
in src/request.rs
16 3 1
fn try_from()
in src/common/headers.rs
19 3 1
fn is_done()
in src/server.rs
5 3 1
31 2 0
30 2 0
29 2 0
28 2 0
15 2 0
22 2 0
41 2 0
fn try_from()
in src/request.rs
8 2 1
fn test_uri()
in src/request.rs
13 2 0