dart-lang / build
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 593 units with 9,136 lines of code in units (50.5% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (440 lines of code)
    • 18 medium complex units (1,106 lines of code)
    • 69 simple units (2,493 lines of code)
    • 503 very simple units (5,097 lines of code)
0% | 4% | 12% | 27% | 55%
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% | 4% | 12% | 27% | 55%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
build_runner0% | 8% | 19% | 25% | 46%
_test_common0% | 53% | 0% | 0% | 46%
build_web_compilers0% | 5% | 33% | 29% | 31%
build_runner_core0% | 0% | 10% | 33% | 55%
build_modules0% | 0% | 0% | 44% | 55%
build_resolvers0% | 0% | 0% | 42% | 57%
build_daemon0% | 0% | 0% | 19% | 80%
build_vm_compilers0% | 0% | 0% | 77% | 22%
build_test0% | 0% | 0% | 2% | 97%
build0% | 0% | 0% | 0% | 100%
build_config0% | 0% | 0% | 0% | 100%
scratch_space0% | 0% | 0% | 0% | 100%
example0% | 0% | 0% | 0% | 100%
_test0% | 0% | 0% | 0% | 100%
tool0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
bool invalidVariableName()
in build_web_compilers/lib/src/ddc_names.dart
52 46 2
bool matches()
in _test_common/lib/matchers.dart
164 35 2
String _renderPerformance()
in build_runner/lib/src/server/server.dart
224 31 6
Future _createDevCompilerModule()
in build_web_compilers/lib/src/dev_compiler_builder.dart
132 21 12
Future Function()
in build_runner_core/lib/src/asset_graph/graph.dart
80 21 1
Future _handleQuery()
in build_runner/lib/src/server/asset_graph_handler.dart
67 19 3
Stream _run()
in build_runner/lib/src/generate/watch_impl.dart
135 17 6
Future _createMergedOutputDir()
in build_runner_core/lib/src/environment/create_merged_dir.dart
73 16 8
StringBuffer colorLog()
in build_runner/lib/src/logging/std_io_logging.dart
34 14 2
bool _shouldSkipNode()
in build_runner_core/lib/src/generate/finalized_assets_view.dart
19 14 4
Future _bootstrapDart2Js()
in build_web_compilers/lib/src/dart2js_bootstrap.dart
106 13 6
Future _createKernelIfNeeded()
in build_runner/lib/src/build_script_generate/bootstrap.dart
64 13 1
Future build()
in build_runner/lib/src/daemon/daemon_builder.dart
71 13 2
Future _tryReadCachedAssetGraph()
in build_runner_core/lib/src/generate/build_definition.dart
78 13 0
String _requireJsConfig()
in build_web_compilers/lib/src/dev_compiler_bootstrap.dart
41 12 1
Future _handle()
in build_runner/lib/src/server/server.dart
50 12 3
Set _removeRecursive()
in build_runner_core/lib/src/asset_graph/graph.dart
37 12 2
String toJSIdentifier()
in build_web_compilers/lib/src/ddc_names.dart
19 11 1
StackTrace mapStackTrace()
in build_web_compilers/web/source_map_stack_trace.dart
39 11 3
Map collectChanges()
in build_runner/lib/src/watcher/collect_changes.dart
36 11 1