dart-lang / convert
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 45 units with 473 lines of code in units (50.1% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 9 medium size units (229 lines of code)
    • 6 small units (87 lines of code)
    • 30 very small units (157 lines of code)
0% | 0% | 48% | 18% | 33%
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% | 48% | 18% | 33%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/src/percent0% | 0% | 70% | 8% | 21%
lib/src/hex0% | 0% | 59% | 9% | 30%
lib/src0% | 0% | 27% | 32% | 40%
example0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
int? _decode()
in lib/src/percent/decoder.dart
32 8 4
Uint8List convert()
in lib/src/codepage.dart
31 8 2
String _convert()
in lib/src/percent/encoder.dart
31 15 3
void addSlice()
in lib/src/percent/decoder.dart
24 8 4
void addSlice()
in lib/src/percent/decoder.dart
23 8 4
void addSlice()
in lib/src/hex/decoder.dart
23 5 4
CodePageDecoder _createDecoder()
in lib/src/codepage.dart
22 5 1
void addSlice()
in lib/src/hex/decoder.dart
22 5 4
String _convert()
in lib/src/hex/encoder.dart
21 7 3
String convert()
in lib/src/codepage.dart
17 5 2
static Uint32List _buildMapping()
in lib/src/codepage.dart
16 4 1
String _convertAllowInvalid()
in lib/src/codepage.dart
15 3 1
int digitForCodeUnit()
in lib/src/utils.dart
15 5 2
void _checkForInvalidCodeUnit()
in lib/src/percent/decoder.dart
13 6 4
int? _decode()
in lib/src/hex/decoder.dart
11 3 5
CodePageEncoder _createEncoder()
in lib/src/codepage.dart
10 3 0
String convert()
in lib/src/codepage.dart
9 3 2
List convert()
in lib/src/percent/decoder.dart
9 2 1
List convert()
in lib/src/hex/decoder.dart
9 2 1
void main()
in example/example.dart
9 2 1