aws-samples / amazon-location-samples
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 66 units with 817 lines of code in units (14.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (166 lines of code)
    • 5 simple units (117 lines of code)
    • 58 very simple units (534 lines of code)
0% | 0% | 20% | 14% | 65%
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
py0% | 0% | 64% | 0% | 35%
js0% | 0% | 13% | 17% | 69%
swift0% | 0% | 0% | 22% | 77%
tsx0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
maplibre-js-react-iot-asset-tracking0% | 0% | 17% | 13% | 68%
geocode-udf-lambda-redshift0% | 0% | 68% | 0% | 31%
geocode-udf-lambda-aurora0% | 0% | 80% | 0% | 19%
tracking-ios0% | 0% | 0% | 49% | 50%
amazon-location-helpers0% | 0% | 0% | 43% | 56%
maplibre-native-ios0% | 0% | 0% | 0% | 100%
tangram-es-ios0% | 0% | 0% | 0% | 100%
aurora-udfs0% | 0% | 0% | 0% | 100%
react-map-gl-amplify-marker-tooltip-example0% | 0% | 0% | 0% | 100%
tangram-js0% | 0% | 0% | 0% | 100%
maplibre-gl-js-react-amplify0% | 0% | 0% | 0% | 100%
maplibre-gl-js-vue-amplify0% | 0% | 0% | 0% | 100%
leaflet-vue-amplify0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function build()
in maplibre-js-react-iot-asset-tracking/scripts/build.js
60 11 1
def geocode_address()
in geocode-udf-lambda-redshift/Lambda/geocode.py
53 11 5
def geocode_address()
in geocode-udf-lambda-aurora/Lambda/geocode.py
53 11 5
function getModules()
in maplibre-js-react-iot-asset-tracking/config/modules.js
27 7 0
func onTrackingEvent()
in tracking-ios/TrackingSample/LocationManagement.swift
15 6 1
func locationManagerDidChangeAuthorization()
in tracking-ios/TrackingSample/LocationManagement.swift
26 6 1
function transformRequest()
in maplibre-js-react-iot-asset-tracking/src/LocationMap.js
21 6 2
async function createRequestTransformer()
in amazon-location-helpers/index.js
28 6 4
def lambda_handler()
in aurora-udfs/search-place-index-for-text/lambda_function.py
14 5 2
function getAdditionalModulePaths()
in maplibre-js-react-iot-asset-tracking/config/modules.js
22 5 1
func locationManager()
in tracking-ios/TrackingSample/LocationManagement.swift
14 4 2
function getHttpsConfig()
in maplibre-js-react-iot-asset-tracking/config/getHttpsConfig.js
15 4 0
_redraw()
in maplibre-js-react-iot-asset-tracking/src/PolylineOverlay.js
20 4 6
func offlineStorage()
in maplibre-native-ios/Amazon Location Service Demo/AWSSignatureV4Delegate.swift
30 4 3
function validateKeyAndCerts()
in maplibre-js-react-iot-asset-tracking/config/getHttpsConfig.js
19 3 4
function getWebpackAliases()
in maplibre-js-react-iot-asset-tracking/config/modules.js
12 3 1
function getJestAliases()
in maplibre-js-react-iot-asset-tracking/config/modules.js
12 3 1
async function getUserCredentials()
in maplibre-js-react-iot-asset-tracking/src/LocationMap.js
12 3 0
function validateCredentials()
in amazon-location-helpers/index.js
6 3 1
async function createMap()
in amazon-location-helpers/index.js
7 3 3