aws-samples / aws-iot-core-lorawan
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 83 units with 2,601 lines of code in units (44.7% of code).
    • 0 very complex units (0 lines of code)
    • 4 complex units (531 lines of code)
    • 4 medium complex units (200 lines of code)
    • 12 simple units (284 lines of code)
    • 63 very simple units (1,586 lines of code)
0% | 20% | 7% | 10% | 60%
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% | 16% | 8% | 11% | 64%
js0% | 67% | 0% | 7% | 25%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
transform_binary_payload0% | 36% | 6% | 10% | 46%
gateway_watchdog0% | 0% | 13% | 0% | 86%
send_downlink_payload0% | 0% | 100% | 0% | 0%
workshop0% | 0% | 0% | 52% | 47%
iotthingshadow0% | 0% | 0% | 39% | 60%
transform_binary_payload_pilot_things0% | 0% | 0% | 100% | 0%
cayenneLPPDecoder0% | 0% | 0% | 100% | 0%
device_watchdog0% | 0% | 0% | 0% | 100%
timestream0% | 0% | 0% | 0% | 100%
timestream_for_transform_binary_payload0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def dict_from_payload()
in transform_binary_payload/src-payload-decoders/python/adeunis_ftd2.py
126 42 2
def dict_from_payload()
in transform_binary_payload/src-payload-decoders/python/elsys.py
135 39 2
def dict_from_payload()
in transform_binary_payload/src-payload-decoders/python/adeunis_dc_v2.py
121 33 2
function DecodeElsysPayload()
in transform_binary_payload/src-payload-decoders/node/elsys.js
149 32 1
def dict_from_payload()
in transform_binary_payload/src-payload-decoders/python/globalsat_lt100.py
53 16 2
def handler()
in gateway_watchdog/src_get_wireless_gateway_statistics_lambda/lambda.py
53 11 2
def lambda_handler()
in send_downlink_payload/src/app.py
47 11 2
def lambda_handler()
in transform_binary_payload/src-iotrule-transformation/app.py
47 11 2
def lambda_handler()
in iotthingshadow/src-iotrule-transformation/app.py
30 9 2
def decode_digital_data()
in transform_binary_payload/src-payload-decoders/python/nas_um3080.py
35 9 2
def dict_from_payload()
in transform_binary_payload/src-payload-decoders/python/sentrius_rs1xx.py
19 8 2
def battery_capacity()
in transform_binary_payload/src-payload-decoders/python/sentrius_rs1xx.py
15 8 1
def dict_from_payload()
in workshop/binarydecoder/src/dragino_lht65.py
31 7 1
def dict_from_payload()
in workshop/sampledecoder/src/dragino_lht65.py
31 7 1
def lambda_handler()
in transform_binary_payload_pilot_things/src-iotrule-transformation/app.py
21 7 2
def get_digital_data()
in transform_binary_payload/src-payload-decoders/python/nas_um3080.py
12 7 4
def dict_from_payload()
in transform_binary_payload/src-payload-decoders/python/dragino_lht65.py
31 7 2
def opt_sens2serv()
in transform_binary_payload/src-payload-decoders/python/sentrius_rs1xx.py
16 7 1
function arrayToDecimal()
in cayenneLPPDecoder/cayennelpp.js
17 6 3
def decode_boot_message()
in transform_binary_payload/src-payload-decoders/python/nas_um3080.py
26 6 1