dart-lang / bazel_worker
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 61 units with 440 lines of code in units (39.4% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (164 lines of code)
    • 3 small units (46 lines of code)
    • 52 very small units (230 lines of code)
0% | 0% | 37% | 10% | 52%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
dart0% | 0% | 37% | 10% | 52%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/src/driver0% | 0% | 57% | 0% | 42%
lib/src/worker0% | 0% | 59% | 0% | 40%
benchmark0% | 0% | 76% | 0% | 23%
lib/src0% | 0% | 0% | 39% | 60%
example0% | 0% | 0% | 72% | 28%
lib0% | 0% | 0% | 0% | 100%
e2e_test/lib0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
void _runWorker()
in lib/src/driver/driver.dart
36 7 2
Future main()
in benchmark/benchmark.dart
30 4 0
void _runWorkQueue()
in lib/src/driver/driver.dart
28 6 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
void run()
in lib/src/worker/sync_worker_loop.dart
23 5 0
void main()
in example/client.dart
18 2 0
List? handleInput()
in lib/src/message_grouper_state.dart
17 5 1
List protoToDelimitedBuffer()
in lib/src/utils.dart
11 1 1
void _cleanUp()
in lib/src/driver/driver.dart
10 3 1
void readByte()
in lib/src/message_grouper_state.dart
9 2 1
Uint8List _varInt()
in benchmark/benchmark.dart
9 2 1
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
Future cancel()
in lib/src/async_message_grouper.dart
7 2 0
Future doWork()
in lib/src/driver/driver.dart
7 1 2
void _killWorker()
in lib/src/driver/driver.dart
6 1 1
static Future create()
in lib/src/driver/driver_connection.dart
6 1 1
Future performRequest()
in e2e_test/lib/async_worker.dart
5 1 1