awslabs / shuttle
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 139 units with 1,512 lines of code in units (35.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (155 lines of code)
    • 5 simple units (181 lines of code)
    • 132 very simple units (1,176 lines of code)
0% | 0% | 10% | 11% | 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% | 10% | 11% | 77%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/sync0% | 0% | 29% | 0% | 70%
src/runtime0% | 0% | 0% | 57% | 42%
src/sync/atomic0% | 0% | 0% | 20% | 79%
src/scheduler0% | 0% | 0% | 6% | 93%
src/runtime/task0% | 0% | 0% | 0% | 100%
src0% | 0% | 0% | 0% | 100%
src/runtime/thread0% | 0% | 0% | 0% | 100%
benches0% | 0% | 0% | 0% | 100%
src/scheduler/data0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
fn send()
in src/sync/mpsc.rs
86 18 2
fn recv()
in src/sync/mpsc.rs
69 17 1
fn schedule()
in src/runtime/execution.rs
41 9 1
fn step()
in src/runtime/execution.rs
74 8 2
fn maybe_warn_about_ordering()
in src/sync/atomic/mod.rs
25 7 1
fn cleanup()
in src/runtime/execution.rs
20 6 0
fn next_task()
in src/scheduler/pct.rs
21 6 4
fn unblock_waiters()
in src/sync/rwlock.rs
20 5 3
fn call_once_inner()
in src/sync/once.rs
42 5 3
fn spawn_named()
in src/thread.rs
35 5 3
fn counter_sync()
in benches/counter.rs
17 4 1
fn drop()
in src/sync/mpsc.rs
13 4 1
fn drop()
in src/sync/mpsc.rs
13 4 1
fn drop()
in src/sync/mpsc.rs
13 4 1
fn lock()
in src/sync/rwlock.rs
68 4 2
fn block_waiters()
in src/sync/rwlock.rs
12 4 3
fn persist_failure_to_file()
in src/runtime/failure.rs
22 4 2
fn new_execution()
in src/scheduler/metrics.rs
13 4 1
fn new_execution()
in src/scheduler/dfs.rs
11 4 1
fn counter_async()
in benches/counter.rs
19 3 1