dart-lang / cli_util
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 24 units with 142 lines of code in units (45.4% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (46 lines of code)
    • 2 small units (29 lines of code)
    • 20 very small units (67 lines of code)
0% | 0% | 32% | 20% | 47%
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% | 32% | 20% | 47%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib0% | 0% | 35% | 12% | 51%
example0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
Directory getSdkDir()
in lib/cli_util.dart
24 9 1
void _updateDisplay()
in lib/cli_logging.dart
22 8 4
String _createPrefix()
in lib/cli_logging.dart
16 4 0
Future main()
in example/main.dart
13 2 1
Progress progress()
in lib/cli_logging.dart
8 2 1
void _cancelProgress()
in lib/cli_logging.dart
7 2 0
void cancel()
in lib/cli_logging.dart
6 2 0
void finish()
in lib/cli_logging.dart
6 2 2
void stderr()
in lib/cli_logging.dart
4 1 1
void stdout()
in lib/cli_logging.dart
4 1 1
void write()
in lib/cli_logging.dart
4 1 1
void writeCharCode()
in lib/cli_logging.dart
4 1 1
void stdout()
in lib/cli_logging.dart
3 1 1
void stderr()
in lib/cli_logging.dart
3 1 1
void trace()
in lib/cli_logging.dart
3 1 1
void write()
in lib/cli_logging.dart
3 1 1
void writeCharCode()
in lib/cli_logging.dart
3 1 1
String toString()
in lib/cli_util.dart
3 1 0
void finish()
in lib/cli_logging.dart
1 1 2
void trace()
in lib/cli_logging.dart
1 1 1