dart-lang / http
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 74 units with 447 lines of code in units (38.2% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (69 lines of code)
    • 6 small units (88 lines of code)
    • 66 very small units (290 lines of code)
0% | 0% | 15% | 19% | 64%
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% | 15% | 19% | 64%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/src0% | 0% | 19% | 10% | 70%
lib0% | 0% | 0% | 56% | 43%
example0% | 0% | 0% | 61% | 38%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
Future send()
in lib/src/io_client.dart
38 4 1
Future send()
in lib/src/browser_client.dart
31 1 1
Future _sendUnstreamed()
in lib/src/base_client.dart
19 7 5
Future send()
in lib/src/base_request.dart
17 2 0
bool Function()
in lib/retry.dart
13 1 1
required bool Function()
in lib/retry.dart
13 1 1
13 1 2
void main()
in example/main.dart
13 2 1
Future toBytes()
in lib/src/byte_stream.dart
10 1 0
set bodyFields()
in lib/src/request.dart
10 3 1
String _headerForField()
in lib/src/multipart_request.dart
10 2 2
bool Function()
in lib/retry.dart
9 1 1
set body()
in lib/src/request.dart
9 3 1
Future multipartFileFromPath()
in lib/src/multipart_file_io.dart
9 1 4
String _boundaryString()
in lib/src/multipart_request.dart
9 1 0
static Future fromStream()
in lib/src/response.dart
9 1 1
Future _withClient()
in lib/http.dart
8 1 1
void _checkResponseSuccess()
in lib/src/base_client.dart
8 3 2
String _headerForFile()
in lib/src/multipart_request.dart
8 2 1
String mapToQuery()
in lib/src/utils.dart
8 1 2