dart-lang / characters
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 94 units with 1,105 lines of code in units (61.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 14 medium size units (400 lines of code)
    • 28 small units (403 lines of code)
    • 52 very small units (302 lines of code)
0% | 0% | 36% | 36% | 27%
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% | 36% | 36% | 27%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/src0% | 0% | 26% | 39% | 34%
lib/src/grapheme_clusters0% | 0% | 81% | 12% | 5%
benchmark0% | 0% | 0% | 68% | 31%
example0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
bool isGraphemeClusterBoundary()
in lib/src/grapheme_clusters/breaks.dart
45 11 4
int nextBreak()
in lib/src/grapheme_clusters/breaks.dart
44 15 4
bool _advanceEnd()
in lib/src/characters_impl.dart
33 10 2
int nextBreak()
in lib/src/grapheme_clusters/breaks.dart
31 11 0
int previousBreak()
in lib/src/grapheme_clusters/breaks.dart
30 8 4
Iterable split()
in lib/src/characters_impl.dart
30 9 2
int nextBreak()
in lib/src/grapheme_clusters/breaks.dart
28 8 0
Iterable split()
in lib/src/characters_impl.dart
28 9 2
CharacterRange? replaceAll()
in lib/src/characters_impl.dart
26 5 2
int lookAheadPictorgraphicExtend()
in lib/src/grapheme_clusters/breaks.dart
21 7 3
Characters takeLast()
in lib/src/characters_impl.dart
21 6 1
String _explodeReplace()
in lib/src/characters_impl.dart
21 3 5
int _indexOf()
in lib/src/characters_impl.dart
21 8 4
int _lastIndexOf()
in lib/src/characters_impl.dart
21 9 4
int lookAheadRegional()
in lib/src/grapheme_clusters/breaks.dart
19 6 3
Characters skipLast()
in lib/src/characters_impl.dart
19 6 1
CharacterRange? replaceFirst()
in lib/src/characters_impl.dart
18 3 2
void main()
in benchmark/benchmark.dart
18 3 1
Characters skipWhile()
in lib/src/characters_impl.dart
17 6 1
Characters skipLastWhile()
in lib/src/characters_impl.dart
17 6 1