microsoft / lain
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 201 units with 3,093 lines of code in units (52.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (360 lines of code)
    • 10 simple units (512 lines of code)
    • 187 very simple units (2,221 lines of code)
0% | 0% | 11% | 16% | 71%
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% | 11% | 16% | 71%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lain_derive/src0% | 0% | 21% | 18% | 59%
lain/src0% | 0% | 10% | 27% | 61%
testsuite/src0% | 0% | 0% | 0% | 100%
lain_derive/src/internals0% | 0% | 0% | 0% | 100%
testsuite/benches0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
fn new_fuzzed()
in lain/src/new_fuzzed.rs
111 20 2
fn field_serialized_size()
in lain_derive/src/serialize.rs
96 15 4
fn field_serializer()
in lain_derive/src/serialize.rs
67 13 3
fn gen_struct_new_fuzzed_impl()
in lain_derive/src/new_fuzzed_old.rs
86 11 2
fn grow_vec()
in lain/src/mutatable.rs
69 10 3
fn mutate()
in lain/src/mutatable.rs
48 10 3
fn gen_struct_mutate_impl()
in lain_derive/src/fuzzerobject.rs
76 10 1
fn new_fuzzed()
in lain/src/new_fuzzed.rs
42 9 2
fn struct_field_constraints()
in lain_derive/src/mutations.rs
43 9 2
fn variable_size_object_helper()
in lain_derive/src/lib.rs
53 8 1
fn mutate()
in lain/src/mutatable.rs
38 7 3
fn new_fuzzed()
in lain/src/new_fuzzed.rs
50 6 2
fn new_fuzzed()
in lain/src/new_fuzzed.rs
50 6 2
fn new_fuzzed_enum()
in lain_derive/src/mutations.rs
43 6 2
fn new_fuzzed()
in lain/src/new_fuzzed.rs
39 5 2
fn mutatable_enum()
in lain_derive/src/mutations.rs
26 5 2
fn mutatable_struct()
in lain_derive/src/mutations.rs
30 5 1
fn new_fuzzed_unit_enum()
in lain_derive/src/mutations.rs
29 5 2
fn field_initializer()
in lain_derive/src/mutations.rs
45 5 2
fn shrink_vec()
in lain/src/mutatable.rs
29 4 2