dart-lang / bazel_worker
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 61 units with 440 lines of code in units (39.4% 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)
    • 2 simple units (64 lines of code)
    • 59 very simple units (376 lines of code)
0% | 0% | 0% | 14% | 85%
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% | 14% | 85%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src/driver0% | 0% | 0% | 42% | 57%
lib/src/worker0% | 0% | 0% | 0% | 100%
lib/src0% | 0% | 0% | 0% | 100%
lib0% | 0% | 0% | 0% | 100%
benchmark0% | 0% | 0% | 0% | 100%
example0% | 0% | 0% | 0% | 100%
e2e_test/lib0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void _runWorker()
in lib/src/driver/driver.dart
36 7 2
void _runWorkQueue()
in lib/src/driver/driver.dart
28 6 0
List? handleInput()
in lib/src/message_grouper_state.dart
17 5 1
void run()
in lib/src/worker/sync_worker_loop.dart
23 5 0
Future run()
in lib/src/worker/async_worker_loop.dart
24 5 0
Future readResponse()
in lib/src/driver/driver_connection.dart
23 4 0
Future main()
in benchmark/benchmark.dart
30 4 0
void _cleanUp()
in lib/src/driver/driver.dart
10 3 1
5 2 1
Future performRequest()
in lib/testing.dart
5 2 1
Future cancel()
in lib/src/async_message_grouper.dart
7 2 0
Future terminateWorkers()
in lib/src/driver/driver.dart
8 2 0
bool _tryReschedule()
in lib/src/driver/driver.dart
8 2 1
Future readResponse()
in lib/src/driver/driver_connection.dart
8 2 0
void readByte()
in lib/src/message_grouper_state.dart
9 2 1
void readByte()
in lib/src/message_grouper_state.dart
5 2 1
Future readRequest()
in lib/src/worker/worker_connection.dart
5 2 0
Future readRequest()
in lib/src/worker/worker_connection.dart
4 2 0
WorkRequest? readRequest()
in lib/src/worker/worker_connection.dart
5 2 0
void main()
in example/client.dart
18 2 0