dart-lang / graphs
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 17 units with 287 lines of code in units (59.7% 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)
    • 5 simple units (181 lines of code)
    • 12 very simple units (106 lines of code)
0% | 0% | 0% | 63% | 36%
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
dart0% | 0% | 0% | 63% | 36%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
benchmark0% | 0% | 0% | 100% | 0%
lib/src0% | 0% | 0% | 53% | 46%
example0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 17 most complex units
Unit# linesMcCabe index# params
void main()
in benchmark/shortest_path_worst_case_benchmark.dart
38 10 0
Iterable Function()
in lib/src/strongly_connected_components.dart
41 8 1
void main()
in benchmark/shortest_path_benchmark.dart
38 8 0
void main()
in benchmark/connected_components_benchmark.dart
34 8 0
Iterable Function()
in lib/src/shortest_path.dart
30 7 1
List topologicalSort()
in lib/src/topological_sort.dart
23 5 2
Future pathForUri()
in example/crawl_async_example.dart
7 3 1
Future run()
in lib/src/crawl_async.dart
9 2 0
Future _crawlFrom()
in lib/src/crawl_async.dart
7 2 1
Future _visit()
in lib/src/crawl_async.dart
5 2 1
Uri resolveImport()
in example/crawl_async_example.dart
8 2 2
Stream crawlAsync()
in lib/src/crawl_async.dart
7 1 2
Iterable? shortestPath()
in lib/src/shortest_path.dart
7 1 3
Iterable Function()
in lib/src/shortest_path.dart
4 1 1
void main()
in example/example.dart
14 1 0
Future main()
in example/crawl_async_example.dart
9 1 0
Future parseUri()
in example/crawl_async_example.dart
6 1 1