dart-lang / stream_channel
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 25 units with 236 lines of code in units (39.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 1 simple units (30 lines of code)
    • 24 very simple units (206 lines of code)
0% | 0% | 0% | 12% | 87%
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% | 0% | 12% | 87%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src0% | 0% | 0% | 12% | 87%
lib0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
VirtualChannel virtualChannel()
in lib/src/multi_channel.dart
30 6 1
void add()
in lib/src/disconnector.dart
8 4 1
void addError()
in lib/src/disconnector.dart
8 4 2
Future addStream()
in lib/src/disconnector.dart
14 4 1
void add()
in lib/src/guarantee_channel.dart
8 4 1
void addError()
in lib/src/guarantee_channel.dart
8 4 2
Future addStream()
in lib/src/guarantee_channel.dart
14 4 1
Future close()
in lib/src/guarantee_channel.dart
12 4 0
StreamSubscription listen()
in lib/src/close_guarantee_channel.dart
13 3 1
void _onStreamDisconnected()
in lib/src/guarantee_channel.dart
8 3 0
void _closeChannel()
in lib/src/multi_channel.dart
8 3 2
Future close()
in lib/src/close_guarantee_channel.dart
10 2 0
StreamChannel bind()
in lib/src/disconnector.dart
11 2 1
Future close()
in lib/src/disconnector.dart
7 2 0
Future _disconnect()
in lib/src/disconnector.dart
10 2 0
void _onSinkDisconnected()
in lib/src/guarantee_channel.dart
6 2 0
void _addError()
in lib/src/guarantee_channel.dart
10 2 2
void setChannel()
in lib/src/stream_channel_completer.dart
6 2 1
void setError()
in lib/src/stream_channel_completer.dart
6 2 2
void _closeInnerChannel()
in lib/src/multi_channel.dart
9 2 0