dart-lang / http2
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 183 units with 2,282 lines of code in units (62.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (42 lines of code)
    • 7 medium complex units (434 lines of code)
    • 18 simple units (492 lines of code)
    • 157 very simple units (1,314 lines of code)
0% | 1% | 19% | 21% | 57%
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% | 1% | 19% | 21% | 57%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src/streams0% | 8% | 16% | 15% | 59%
lib/src/frames0% | 0% | 28% | 14% | 56%
lib/src/hpack0% | 0% | 33% | 30% | 36%
lib/src/settings0% | 0% | 54% | 0% | 45%
lib/src0% | 0% | 10% | 21% | 68%
lib/src/flowcontrol0% | 0% | 8% | 39% | 51%
example0% | 0% | 0% | 69% | 30%
lib0% | 0% | 0% | 0% | 100%
lib/src/ping0% | 0% | 0% | 0% | 100%
lib/src/async_utils0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void _changeState()
in lib/src/streams/stream_handler.dart
42 39 2
void _processStreamFrameInternal()
in lib/src/streams/stream_handler.dart
77 21 2
Frame _readFrame()
in lib/src/frames/frame_reader.dart
106 17 3
List decode()
in lib/src/hpack/hpack.dart
85 15 1
Frame? tryDefragmentFrame()
in lib/src/frames/frame_defragmenter.dart
54 13 1
void _tryDispatch()
in lib/src/flowcontrol/stream_queues.dart
34 13 0
void _handleFrameImpl()
in lib/src/connection.dart
38 12 1
void _modifySettings()
in lib/src/settings/settings.dart
40 11 3
Stream startDecoding()
in lib/src/frames/frame_reader.dart
78 10 0
List decode()
in lib/src/hpack/huffman.dart
42 10 1
void _trySendMessages()
in lib/src/flowcontrol/connection_queues.dart
18 10 0
void _trySendData()
in lib/src/flowcontrol/stream_queues.dart
41 10 0
void onData()
in lib/src/connection_preface.dart
23 9 1
List encode()
in lib/src/hpack/huffman.dart
35 7 1
void _handleNewOutgoingMessage()
in lib/src/streams/stream_handler.dart
20 7 2
void _finishing()
in lib/src/connection.dart
20 7 2
void _trySendMessage()
in lib/src/flowcontrol/connection_queues.dart
38 7 0
void main()
in example/display_headers.dart
32 7 1
ServerTransportStream _push()
in lib/src/streams/stream_handler.dart
26 6 2
void _terminateStream()
in lib/src/streams/stream_handler.dart
10 6 1