dart-lang / webdev
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 545 units with 7,732 lines of code in units (58.6% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (158 lines of code)
    • 14 medium complex units (948 lines of code)
    • 53 simple units (1,779 lines of code)
    • 476 very simple units (4,847 lines of code)
0% | 2% | 12% | 23% | 62%
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% | 2% | 12% | 23% | 62%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
webdev/lib0% | 9% | 18% | 22% | 49%
dwds/lib0% | 1% | 9% | 23% | 66%
dwds/web0% | 0% | 33% | 28% | 37%
frontend_server_client/lib0% | 0% | 24% | 22% | 52%
dwds/debug_extension0% | 0% | 24% | 20% | 54%
frontend_server_common/lib0% | 0% | 7% | 29% | 62%
frontend_server_client/example0% | 0% | 0% | 48% | 51%
example/web0% | 0% | 0% | 0% | 100%
fixtures/_testSound0% | 0% | 0% | 0% | 100%
fixtures/_test0% | 0% | 0% | 0% | 100%
fixtures/_webdevSmoke0% | 0% | 0% | 0% | 100%
fixtures/_testPackageSound0% | 0% | 0% | 0% | 100%
fixtures/_testPackage0% | 0% | 0% | 0% | 100%
fixtures/_webdevSoundSmoke0% | 0% | 0% | 0% | 100%
dwds/tool0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
bool invalidVariableName()
in dwds/lib/src/utilities/ddc_names.dart
52 46 2
static Configuration fromArgs()
in webdev/lib/src/command/configuration.dart
106 27 2
Future main()
in dwds/web/client.dart
115 25 0
Future compile()
in frontend_server_client/lib/src/frontend_server_client.dart
97 21 1
void _handleConnection()
in dwds/lib/src/handlers/dev_handler.dart
64 16 1
void handler()
in frontend_server_common/lib/src/frontend_server_client.dart
72 16 1
void _validateConfiguration()
in webdev/lib/src/command/configuration.dart
31 15 0
Future _pauseHandler()
in dwds/lib/src/debugging/debugger.dart
76 14 1
static Future start()
in webdev/lib/src/serve/webdev_server.dart
107 13 2
Future _startSseClient()
in dwds/debug_extension/web/background.dart
81 13 6
Future _instanceRefForRemote()
in dwds/lib/src/debugging/instance.dart
68 12 1
Future _startLocalDebugService()
in dwds/lib/src/handlers/dev_handler.dart
72 12 2
Future run()
in webdev/lib/src/command/build_command.dart
69 11 0
Future _collectAsyncFrames()
in dwds/lib/src/debugging/frame_computer.dart
42 11 1
Stream onEvent()
in dwds/lib/src/services/chrome_proxy_service.dart
35 11 1
String toJSIdentifier()
in dwds/lib/src/utilities/ddc_names.dart
19 11 1
String formatLog()
in webdev/lib/src/logging.dart
28 10 6
Future _initialize()
in dwds/lib/src/debugging/metadata/provider.dart
39 10 0
static Future start()
in frontend_server_client/lib/src/frontend_server_client.dart
53 10 16
Future _compile()
in frontend_server_common/lib/src/frontend_server_client.dart
61 10 3