dart-lang / web_socket_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 51 units with 579 lines of code in units (45.4% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (95 lines of code)
    • 6 medium size units (156 lines of code)
    • 10 small units (137 lines of code)
    • 34 very small units (191 lines of code)
0% | 16% | 26% | 23% | 32%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
dart0% | 16% | 26% | 23% | 32%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/src/copy0% | 18% | 31% | 22% | 27%
lib/src0% | 0% | 0% | 24% | 75%
lib0% | 0% | 0% | 68% | 31%
example0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
void add()
in lib/src/copy/web_socket_impl.dart
95 32 1
void _unmask()
in lib/src/copy/web_socket_impl.dart
31 7 3
void _controlFrameEnd()
in lib/src/copy/web_socket_impl.dart
29 8 0
void add()
in lib/src/copy/web_socket_impl.dart
26 6 1
void _ensureController()
in lib/src/copy/web_socket_impl.dart
25 4 0
void _startPayload()
in lib/src/copy/web_socket_impl.dart
23 6 0
Future close()
in lib/src/copy/web_socket_impl.dart
22 7 2
Future addStream()
in lib/src/copy/web_socket_impl.dart
16 3 1
void _messageFrameEnd()
in lib/src/copy/web_socket_impl.dart
15 4 0
void close()
in lib/src/copy/web_socket_impl.dart
15 3 0
Future addStream()
in lib/src/copy/io_sink.dart
14 4 1
Future close()
in lib/src/copy/io_sink.dart
14 4 0
void _lengthDone()
in lib/src/copy/web_socket_impl.dart
14 4 0
set pingInterval()
in lib/src/copy/web_socket_impl.dart
13 5 1
void _setDestinationSink()
in lib/src/sink_completer.dart
13 3 1
Future flush()
in lib/src/copy/io_sink.dart
12 3 0
void _listen()
in lib/html.dart
11 4 0
void _prepareForNextFrame()
in lib/src/copy/web_socket_impl.dart
10 3 0
void addFrame()
in lib/src/copy/web_socket_impl.dart
10 1 2
bool _done()
in lib/src/copy/web_socket_impl.dart
10 3 2