flutter / cocoon
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 953 units with 11,807 lines of code in units (55.2% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (214 lines of code)
    • 14 medium complex units (746 lines of code)
    • 42 simple units (1,582 lines of code)
    • 895 very simple units (9,265 lines of code)
0% | 1% | 6% | 13% | 78%
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% | 6% | 13% | 77%
go0% | 0% | 0% | 29% | 70%
cpp0% | 0% | 0% | 0% | 100%
cc0% | 0% | 0% | 0% | 100%
swift0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
app_dart/lib0% | 4% | 8% | 15% | 72%
dashboard/lib0% | 0% | 4% | 14% | 81%
release_dashboard/lib0% | 0% | 7% | 11% | 81%
repo_dashboard/lib0% | 0% | 5% | 9% | 84%
licenses0% | 0% | 26% | 16% | 57%
oneoff/cirrus_stats0% | 0% | 0% | 29% | 70%
device_doctor/lib0% | 0% | 0% | 9% | 90%
dashboard/windows0% | 0% | 0% | 0% | 100%
app_dart/dev0% | 0% | 0% | 0% | 100%
release_dashboard/linux0% | 0% | 0% | 0% | 100%
dashboard/linux0% | 0% | 0% | 0% | 100%
device_doctor/tool0% | 0% | 0% | 0% | 100%
app_dart/integration_test0% | 0% | 0% | 0% | 100%
release_dashboard/macos0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
TestOwnership getTestOwnership()
in app_dart/lib/src/request_handlers/flaky_handler_utils.dart
100 32 3
Future _sendStatusUpdates()
in app_dart/lib/src/request_handlers/push_gold_status_to_github.dart
114 26 2
Future _applyFrameworkRepoLabels()
in app_dart/lib/src/request_handlers/github_webhook.dart
51 25 3
Future _applyPackageTestChecks()
in app_dart/lib/src/request_handlers/github_webhook.dart
40 23 3
Iterable _allFiles()
in licenses/check_licenses.dart
36 22 3
factory Task()
in dashboard/lib/model/task.pb.dart
81 20 20
Future _checkStatuses()
in app_dart/lib/src/request_handlers/check_for_waiting_pull_requests.dart
77 19 8
Future fetchBuildStatus()
in repo_dashboard/lib/services/build_status_service.dart
76 18 1
Future _handlePullRequest()
in app_dart/lib/src/request_handlers/github_webhook.dart
42 17 1
Future _applyEngineRepoLabels()
in app_dart/lib/src/request_handlers/github_webhook.dart
34 14 3
factory Target()
in app_dart/lib/src/model/proto/internal/scheduler.pb.dart
57 14 7
Future calculateCumulativeStatus()
in app_dart/lib/src/service/build_status_provider.dart
31 13 1
Widget build()
in release_dashboard/lib/widgets/merge_pr_substeps.dart
103 11 1
bool _allChangesAreCodeComments()
in app_dart/lib/src/request_handlers/github_webhook.dart
33 11 1
Future _updateExistingFlakyIssue()
in app_dart/lib/src/request_handlers/update_existing_flaky_issues.dart
34 11 7
Widget stageIconForBrightness()
in dashboard/lib/widgets/task_icon.dart
51 11 1
BuilderType getTypeForBuilder()
in app_dart/lib/src/request_handlers/flaky_handler_utils.dart
22 10 2
Widget build()
in dashboard/lib/widgets/task_overlay.dart
87 10 1
Future post()
in app_dart/lib/src/request_handlers/reset_prod_task.dart
80 9 0
Future _updateStatus()
in app_dart/lib/src/request_handlers/refresh_chromebot_status.dart
45 9 5