dart-lang / dart_ci
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 323 units with 4,487 lines of code in units (51.8% of code).
    • 1 very long units (117 lines of code)
    • 13 long units (888 lines of code)
    • 42 medium size units (1,274 lines of code)
    • 77 small units (1,149 lines of code)
    • 190 very small units (1,059 lines of code)
2% | 19% | 28% | 25% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
dart2% | 19% | 28% | 25% | 23%
py0% | 0% | 0% | 79% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
github-label-notifier/symbolizer8% | 27% | 36% | 13% | 13%
current_results_ui/lib0% | 45% | 18% | 20% | 15%
builder/lib0% | 13% | 27% | 30% | 28%
github-label-notifier/functions0% | 35% | 22% | 24% | 17%
current_results/lib0% | 0% | 66% | 7% | 26%
results_feed/lib0% | 0% | 10% | 45% | 44%
baseline/lib0% | 0% | 71% | 21% | 7%
appengine/lib0% | 0% | 77% | 22% | 0%
github-label-notifier/ui0% | 0% | 0% | 59% | 40%
ROOT0% | 0% | 0% | 79% | 20%
results_feed/web0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
void processLines()
in github-label-notifier/symbolizer/lib/parser.dart
117 28 0
Future onIssueOpened()
in github-label-notifier/functions/node/index.dart
91 13 1
Widget build()
in current_results_ui/lib/results.dart
86 8 1
void postResultComment()
in github-label-notifier/symbolizer/lib/bot.dart
84 15 4
static BotCommand parseCommand()
in github-label-notifier/symbolizer/lib/bot.dart
75 18 2
Widget build()
in current_results_ui/lib/instructions.dart
75 2 1
Widget build()
in current_results_ui/lib/filter.dart
71 4 1
Future storeTryChange()
in builder/lib/src/firestore.dart
70 3 3
Future _symbolizeCustomFrames()
in github-label-notifier/symbolizer/lib/symbolizer.dart
60 10 5
Future _getNewCommits()
in builder/lib/src/commits_cache.dart
57 13 0
Future _symbolizeIosFrames()
in github-label-notifier/symbolizer/lib/symbolizer.dart
57 10 5
Widget build()
in current_results_ui/lib/main.dart
56 1 1
void mailFailures()
in github-label-notifier/symbolizer/lib/bot.dart
53 7 4
Future _symbolizeCrash()
in github-label-notifier/symbolizer/lib/symbolizer.dart
53 15 3
Future getLog()
in appengine/lib/src/get_log.dart
47 11 4
Future serve()
in github-label-notifier/symbolizer/lib/server.dart
47 5 4
Future storeChange()
in builder/lib/src/builder.dart
43 9 1
Future executeCommand()
in github-label-notifier/symbolizer/lib/bot.dart
42 8 5
Future updateResult()
in builder/lib/src/firestore.dart
40 4 5
Future _symbolizeCrashWithGivenSymbols()
in github-label-notifier/symbolizer/lib/symbolizer.dart
37 4 3