aws-solutions / aws-connected-vehicle-solution
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 89 units with 1,958 lines of code in units (61.1% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (88 lines of code)
    • 0 medium complex units (0 lines of code)
    • 7 simple units (442 lines of code)
    • 81 very simple units (1,428 lines of code)
0% | 4% | 0% | 22% | 72%
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
js0% | 4% | 0% | 22% | 72%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
services/vehicle0% | 13% | 0% | 18% | 68%
resources/helper0% | 0% | 0% | 28% | 71%
services/jitr0% | 0% | 0% | 100% | 0%
services/anomaly0% | 0% | 0% | 26% | 73%
services/marketing0% | 0% | 0% | 30% | 69%
services/dtc0% | 0% | 0% | 7% | 92%
services/notification0% | 0% | 0% | 0% | 100%
services/driversafety0% | 0% | 0% | 0% | 100%
data-loaders/dtc-generator0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function processRequest()
in source/services/vehicle/lib/index.js
88 28 2
exports.handler = function()
in source/services/jitr/index.js
92 8 3
kinesisHelper.prototype.createKinesisAnalyticsApp = function()
in source/resources/helper/lib/kinesis-helper.js
103 6 2
anomaly.prototype.createAnomaly = function()
in source/services/anomaly/lib/anomaly.js
61 6 2
anomaly.prototype.acknowledgeVehicleAnomaly = function()
in source/services/vehicle/lib/anomaly.js
58 6 4
dtc.prototype.acknowledgeVehicleDtc = function()
in source/services/vehicle/lib/dtc.js
58 6 4
module.exports.respond = function()
in source/services/dtc/lib/index.js
18 6 2
let processAd = function()
in source/services/marketing/lib/marketing.js
52 6 3
let getAnomalyPage = function()
in source/services/anomaly/lib/anomaly.js
28 5 5
anomaly.prototype.getVehicleAnomaly = function()
in source/services/vehicle/lib/anomaly.js
47 5 4
healthreport.prototype.getVehicleHealthReport = function()
in source/services/vehicle/lib/healthreport.js
47 5 4
trip.prototype.getVehicleTrip = function()
in source/services/vehicle/lib/trip.js
47 5 4
dtc.prototype.getVehicleDtc = function()
in source/services/vehicle/lib/dtc.js
47 5 4
let getDtcPage = function()
in source/services/dtc/lib/dtc.js
28 5 5
anomaly.prototype.deleteAnomaly = function()
in source/services/anomaly/lib/anomaly.js
31 4 3
module.exports.respond = function()
in source/services/anomaly/lib/index.js
21 4 2
let getUser = function()
in source/services/notification/lib/notification.js
34 4 2
anomaly.prototype.listAnomaliesByVehicle = function()
in source/services/vehicle/lib/anomaly.js
39 4 3
healthreport.prototype.listHealthReportsByVehicle = function()
in source/services/vehicle/lib/healthreport.js
39 4 3
trip.prototype.listTripsByVehicle = function()
in source/services/vehicle/lib/trip.js
39 4 3