dart-lang / http_io
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 258 units with 3,768 lines of code in units (68.2% of code).
    • 2 very complex units (466 lines of code)
    • 3 complex units (290 lines of code)
    • 15 medium complex units (891 lines of code)
    • 18 simple units (465 lines of code)
    • 220 very simple units (1,656 lines of code)
12% | 7% | 23% | 12% | 43%
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
dart12% | 7% | 23% | 12% | 43%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src12% | 7% | 23% | 12% | 43%
lib0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void _doParse()
in lib/src/http_parser.dart
350 115 0
DateTime parseCookieDate()
in lib/src/http_headers_impl.dart
116 65 1
String _findReasonPhrase()
in lib/src/http_impl.dart
89 42 1
void _parse()
in lib/src/http_headers_impl.dart
104 37 4
_HttpClientRequest send()
in lib/src/http_impl.dart
97 27 4
void _parseSetCookieValue()
in lib/src/http_headers_impl.dart
70 23 1
List parseCookies()
in lib/src/http_headers_impl.dart
62 22 0
Future _authenticate()
in lib/src/http_impl.dart
87 21 1
58 20 2
Future writeHeaders()
in lib/src/http_impl.dart
45 17 2
Future close()
in lib/src/http_impl.dart
64 16 0
void _onDone()
in lib/src/http_parser.dart
42 16 0
static DateTime parse()
in lib/src/http_date.dart
129 16 1
void _add()
in lib/src/http_headers_impl.dart
49 15 2
static List base64StringToBytes()
in lib/src/crypto.dart
45 15 2
Future addStream()
in lib/src/http_impl.dart
66 14 1
void _validate()
in lib/src/http_headers_impl.dart
39 14 0
bool _headersEnd()
in lib/src/http_parser.dart
51 13 0
Future _openUrl()
in lib/src/http_impl.dart
39 11 2
static String bytesToBase64()
in lib/src/crypto.dart
45 11 3