dart-lang / path
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 48 units with 762 lines of code in units (58.9% of code).
    • 1 very long units (104 lines of code)
    • 0 long units (0 lines of code)
    • 9 medium size units (313 lines of code)
    • 12 small units (178 lines of code)
    • 26 very small units (167 lines of code)
13% | 0% | 41% | 23% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
dart13% | 0% | 41% | 23% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/src17% | 0% | 46% | 18% | 17%
benchmark0% | 0% | 100% | 0% | 0%
lib/src/style0% | 0% | 0% | 55% | 44%
example0% | 0% | 0% | 0% | 100%
lib0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
104 38 2
String relative()
in lib/src/context.dart
49 24 2
void main()
in benchmark/benchmark.dart
45 5 1
bool _needsNormalization()
in lib/src/context.dart
40 21 1
_PathRelation _isWithinOrEquals()
in lib/src/context.dart
35 21 2
void normalize()
in lib/src/parsed_path.dart
33 16 1
_PathDirection _pathDirection()
in lib/src/context.dart
31 18 2
String joinAll()
in lib/src/context.dart
30 9 1
int? _hashFast()
in lib/src/context.dart
29 11 1
String join()
in lib/src/context.dart
21 1 8
int rootLength()
in lib/src/style/url.dart
19 14 2
Uri absolutePathToUri()
in lib/src/style/windows.dart
19 5 1
int rootLength()
in lib/src/style/windows.dart
18 12 2
void _validateArgList()
in lib/src/context.dart
17 7 2
factory Context()
in lib/src/context.dart
16 5 2
String absolute()
in lib/src/context.dart
14 4 7
String pathFromUri()
in lib/src/style/windows.dart
14 7 1
String prettyUri()
in lib/src/context.dart
13 7 1
int _kthLastIndexOf()
in lib/src/parsed_path.dart
13 4 3
List _splitExtension()
in lib/src/parsed_path.dart
13 5 1