dart-lang / stream_channel
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 25 units with 236 lines of code in units (39.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (30 lines of code)
    • 5 small units (64 lines of code)
    • 19 very small units (142 lines of code)
0% | 0% | 12% | 27% | 60%
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% | 12% | 27% | 60%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/src0% | 0% | 12% | 27% | 59%
lib0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
VirtualChannel virtualChannel()
in lib/src/multi_channel.dart
30 6 1
Future addStream()
in lib/src/disconnector.dart
14 4 1
Future addStream()
in lib/src/guarantee_channel.dart
14 4 1
StreamSubscription listen()
in lib/src/close_guarantee_channel.dart
13 3 1
Future close()
in lib/src/guarantee_channel.dart
12 4 0
StreamChannel bind()
in lib/src/disconnector.dart
11 2 1
Future close()
in lib/src/close_guarantee_channel.dart
10 2 0
Future _disconnect()
in lib/src/disconnector.dart
10 2 0
void _addError()
in lib/src/guarantee_channel.dart
10 2 2
void _closeInnerChannel()
in lib/src/multi_channel.dart
9 2 0
void add()
in lib/src/disconnector.dart
8 4 1
void addError()
in lib/src/disconnector.dart
8 4 2
void add()
in lib/src/guarantee_channel.dart
8 4 1
void addError()
in lib/src/guarantee_channel.dart
8 4 2
void _onStreamDisconnected()
in lib/src/guarantee_channel.dart
8 3 0
StreamChannel bind()
in lib/src/json_document_transformer.dart
8 1 1
factory IsolateChannel()
in lib/src/isolate_channel.dart
8 1 2
void _closeChannel()
in lib/src/multi_channel.dart
8 3 2
Future close()
in lib/src/disconnector.dart
7 2 0
void _onSinkDisconnected()
in lib/src/guarantee_channel.dart
6 2 0