dart-lang / async
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 172 units with 1,267 lines of code in units (53.8% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (129 lines of code)
    • 36 small units (500 lines of code)
    • 131 very small units (638 lines of code)
0% | 0% | 10% | 39% | 50%
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% | 10% | 39% | 50%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/src0% | 0% | 12% | 44% | 43%
lib/src/stream_sink_transformer0% | 0% | 0% | 26% | 73%
lib/src/result0% | 0% | 0% | 0% | 100%
lib/src/delegate0% | 0% | 0% | 0% | 100%
lib/src/typed0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
Stream bind()
in lib/src/stream_closer.dart
34 6 1
CancelableOperation then()
in lib/src/cancelable_operation.dart
28 8 1
static CancelableOperation race()
in lib/src/cancelable_operation.dart
24 5 1
Future? _onCancel()
in lib/src/stream_group.dart
22 6 0
void complete()
in lib/src/cancelable_operation.dart
21 7 1
void add()
in lib/src/future_group.dart
20 8 1
bool update()
in lib/src/stream_queue.dart
19 4 2
StreamTransformer subscriptionTransformer()
in lib/src/stream_subscription_transformer.dart
18 1 1
Future withTransaction()
in lib/src/stream_queue.dart
18 3 1
StreamSubscription listen()
in lib/src/subscription_stream.dart
17 3 1
Stream split()
in lib/src/stream_splitter.dart
17 4 0
StreamSubscription listen()
in lib/src/lazy_stream.dart
17 3 1
bool update()
in lib/src/stream_queue.dart
17 5 2
StreamSubscription listen()
in lib/src/stream_completer.dart
16 5 1
Stream _extractStream()
in lib/src/stream_queue.dart
16 4 0
bool update()
in lib/src/stream_queue.dart
16 5 2
bool update()
in lib/src/stream_queue.dart
16 5 2
void _ensureListening()
in lib/src/stream_queue.dart
15 3 0
void handleData()
in lib/src/stream_zip.dart
15 4 2
Future close()
in lib/src/stream_closer.dart
14 3 0