awslabs / amazon-qldb-shell
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 76 units with 730 lines of code in units (34.0% 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)
    • 4 simple units (165 lines of code)
    • 72 very simple units (565 lines of code)
0% | 0% | 0% | 22% | 77%
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% | 22% | 77%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/settings0% | 0% | 0% | 40% | 59%
src/results0% | 0% | 0% | 38% | 61%
src0% | 0% | 0% | 7% | 92%
src/command0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
fn try_from()
in src/settings/config.rs
48 9 1
fn validate_structure()
in src/repl_helper.rs
29 7 1
fn build_table()
in src/results/table.rs
47 7 1
fn try_from()
in src/settings/config.rs
41 6 1
fn try_from()
in src/settings/config.rs
34 4 1
fn new_transaction()
in src/transaction.rs
44 4 1
fn config_dir_path()
in src/settings/config.rs
12 3 0
fn user_input()
in src/ui.rs
20 3 1
fn highlight_prompt()
in src/repl_helper.rs
15 3 3
fn validate()
in src/repl_helper.rs
8 3 2
fn from_str()
in src/settings/config.rs
7 2 1
fn try_from()
in src/settings/config.rs
10 2 1
fn from_str()
in src/settings/command_line.rs
8 2 1
fn is_special_command()
in src/runner.rs
6 2 1
fn user_input()
in src/ui.rs
10 2 1
fn drop()
in src/ui.rs
5 2 1
fn keep_going()
in src/ui.rs
3 2 1
fn drop()
in src/transaction.rs
5 2 1
fn starts()
in src/repl_helper.rs
16 2 2
fn completes()
in src/repl_helper.rs
14 2 2