dart-lang / stack_trace
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 27 units with 293 lines of code in units (41.2% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (81 lines of code)
    • 9 small units (123 lines of code)
    • 15 very small units (89 lines of code)
0% | 0% | 27% | 41% | 30%
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% | 27% | 41% | 30%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/src0% | 0% | 27% | 41% | 30%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
Trace foldFrames()
in lib/src/trace.dart
31 16 1
static T capture()
in lib/src/chain.dart
29 6 1
void _handleUncaughtError()
in lib/src/stack_zone_specification.dart
21 5 5
static List _parseVM()
in lib/src/trace.dart
18 3 1
Frame parseLocation()
in lib/src/frame.dart
17 5 2
Chain chainFor()
in lib/src/stack_zone_specification.dart
15 5 1
Chain foldFrames()
in lib/src/chain.dart
14 6 1
String toString()
in lib/src/vm_trace.dart
13 1 0
T _run()
in lib/src/stack_zone_specification.dart
12 2 1
String toString()
in lib/src/chain.dart
12 1 0
AsyncError? _errorCallback()
in lib/src/stack_zone_specification.dart
11 4 5
static Uri _uriOrPathToUri()
in lib/src/frame.dart
11 5 1
Trace _currentTrace()
in lib/src/stack_zone_specification.dart
9 2 1
Chain toChain()
in lib/src/stack_zone_specification.dart
9 2 0
ZoneSpecification toSpec()
in lib/src/stack_zone_specification.dart
8 2 0
ZoneUnaryCallback _registerUnaryCallback()
in lib/src/stack_zone_specification.dart
8 2 4
ZoneBinaryCallback _registerBinaryCallback()
in lib/src/stack_zone_specification.dart
8 2 5
String toString()
in lib/src/trace.dart
8 2 0
7 2 2
ZoneCallback _registerCallback()
in lib/src/stack_zone_specification.dart
6 2 4