dart-lang / web_socket_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 51 units with 579 lines of code in units (45.4% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (95 lines of code)
    • 0 medium complex units (0 lines of code)
    • 5 simple units (131 lines of code)
    • 45 very simple units (353 lines of code)
0% | 16% | 0% | 22% | 60%
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% | 16% | 0% | 22% | 60%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src/copy0% | 18% | 0% | 26% | 55%
lib/src0% | 0% | 0% | 0% | 100%
lib0% | 0% | 0% | 0% | 100%
example0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void add()
in lib/src/copy/web_socket_impl.dart
95 32 1
void _controlFrameEnd()
in lib/src/copy/web_socket_impl.dart
29 8 0
void _unmask()
in lib/src/copy/web_socket_impl.dart
31 7 3
Future close()
in lib/src/copy/web_socket_impl.dart
22 7 2
void _startPayload()
in lib/src/copy/web_socket_impl.dart
23 6 0
void add()
in lib/src/copy/web_socket_impl.dart
26 6 1
set pingInterval()
in lib/src/copy/web_socket_impl.dart
13 5 1
void _listen()
in lib/html.dart
11 4 0
Future addStream()
in lib/src/copy/io_sink.dart
14 4 1
Future close()
in lib/src/copy/io_sink.dart
14 4 0
void _lengthDone()
in lib/src/copy/web_socket_impl.dart
14 4 0
void _messageFrameEnd()
in lib/src/copy/web_socket_impl.dart
15 4 0
void _ensureController()
in lib/src/copy/web_socket_impl.dart
25 4 0
Future flush()
in lib/src/copy/io_sink.dart
12 3 0
void _prepareForNextFrame()
in lib/src/copy/web_socket_impl.dart
10 3 0
void close()
in lib/src/copy/web_socket_impl.dart
15 3 0
bool _done()
in lib/src/copy/web_socket_impl.dart
10 3 2
Future addStream()
in lib/src/copy/web_socket_impl.dart
16 3 1
void _close()
in lib/src/copy/web_socket_impl.dart
10 3 2
void _setDestinationSink()
in lib/src/sink_completer.dart
13 3 1