dart-lang / sse
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 17 units with 167 lines of code in units (40.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (23 lines of code)
    • 6 small units (87 lines of code)
    • 10 very small units (57 lines of code)
0% | 0% | 13% | 52% | 34%
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% | 13% | 52% | 34%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/src/server0% | 0% | 23% | 56% | 19%
lib/client0% | 0% | 0% | 46% | 53%
lib/src/util0% | 0% | 0% | 100% | 0%
example0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 17 longest units
Unit# linesMcCabe index# params
Future _setUpListener()
in lib/src/server/sse_handler.dart
23 10 0
void _onOutgoingMessage()
in lib/client/sse_client.dart
19 4 1
Future _handleIncomingMessage()
in lib/src/server/sse_handler.dart
16 2 2
String generateUuidV4()
in lib/src/util/uuid.dart
14 1 0
void _addIncomingMessage()
in lib/src/server/sse_handler.dart
13 3 2
Future _handle()
in lib/src/server/sse_handler.dart
13 6 1
void _close()
in lib/src/server/sse_handler.dart
12 4 0
void main()
in example/server.dart
10 2 0
void _onIncomingControlMessage()
in lib/client/sse_client.dart
8 2 1
void _handleDisconnect()
in lib/src/server/sse_handler.dart
7 4 0
void close()
in lib/client/sse_client.dart
6 2 0
void main()
in example/index.dart
6 1 0
void _onIncomingMessage()
in lib/client/sse_client.dart
5 1 1
void shutdown()
in lib/src/server/sse_handler.dart
5 2 0
void _acceptReconnection()
in lib/src/server/sse_handler.dart
4 1 1
void _onOutgoingDone()
in lib/client/sse_client.dart
3 1 0
void shutdown()
in lib/src/server/sse_handler.dart
3 1 0