dart-lang / stack_trace
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 27 units with 293 lines of code in units (41.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (31 lines of code)
    • 2 simple units (43 lines of code)
    • 24 very simple units (219 lines of code)
0% | 0% | 10% | 14% | 74%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
dart0% | 0% | 10% | 14% | 74%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src0% | 0% | 10% | 14% | 74%
Most Complex Units
Top 20 most complex 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
Chain foldFrames()
in lib/src/chain.dart
14 6 1
Chain chainFor()
in lib/src/stack_zone_specification.dart
15 5 1
void _handleUncaughtError()
in lib/src/stack_zone_specification.dart
21 5 5
Frame parseLocation()
in lib/src/frame.dart
17 5 2
static Uri _uriOrPathToUri()
in lib/src/frame.dart
11 5 1
AsyncError? _errorCallback()
in lib/src/stack_zone_specification.dart
11 4 5
static List _parseVM()
in lib/src/trace.dart
18 3 1
ZoneSpecification toSpec()
in lib/src/stack_zone_specification.dart
8 2 0
ZoneCallback _registerCallback()
in lib/src/stack_zone_specification.dart
6 2 4
ZoneUnaryCallback _registerUnaryCallback()
in lib/src/stack_zone_specification.dart
8 2 4
ZoneBinaryCallback _registerBinaryCallback()
in lib/src/stack_zone_specification.dart
8 2 5
T _run()
in lib/src/stack_zone_specification.dart
12 2 1
Trace _currentTrace()
in lib/src/stack_zone_specification.dart
9 2 1
String _trimVMChain()
in lib/src/stack_zone_specification.dart
5 2 1
Chain toChain()
in lib/src/stack_zone_specification.dart
9 2 0
static T disable()
in lib/src/chain.dart
5 2 1
return LazyChain()
in lib/src/chain.dart
5 2 1
static String format()
in lib/src/trace.dart
5 2 2