aws / aws-fpga
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 603 units with 11,420 lines of code in units (0.2% of code).
    • 1 very complex units (395 lines of code)
    • 5 complex units (822 lines of code)
    • 32 medium complex units (2,074 lines of code)
    • 81 simple units (2,744 lines of code)
    • 484 very simple units (5,385 lines of code)
3% | 7% | 18% | 24% | 47%
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
cpp16% | 13% | 14% | 15% | 40%
c0% | 5% | 19% | 31% | 43%
h0% | 11% | 29% | 20% | 38%
py0% | 0% | 6% | 12% | 81%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
SDAccel/userspace/src11% | 13% | 21% | 18% | 35%
sdk/linux_kernel_drivers/xdma0% | 5% | 22% | 35% | 37%
sdk/userspace/fpga_mgmt_tools0% | 31% | 0% | 34% | 34%
sdk/userspace/fpga_libs0% | 0% | 23% | 19% | 57%
sdk/userspace/utils0% | 0% | 34% | 7% | 58%
shared/lib/aws_fpga_utils0% | 0% | 85% | 0% | 14%
shared/lib0% | 0% | 19% | 5% | 75%
SDAccel/userspace/include0% | 0% | 7% | 0% | 92%
sdk/apps/virtual-ethernet0% | 0% | 0% | 36% | 63%
hdk/common/shell_stable0% | 0% | 0% | 25% | 75%
hdk/common/shell_v042618180% | 0% | 0% | 25% | 75%
shared/lib/aws_fpga_test_utils0% | 0% | 0% | 3% | 96%
ROOT0% | 0% | 0% | 65% | 34%
hdk/common/software0% | 0% | 0% | 0% | 100%
sdk/apps/byte_swapper0% | 0% | 0% | 0% | 100%
sdk/userspace/python_bindings0% | 0% | 0% | 0% | 100%
sdk/userspace/include0% | 0% | 0% | 0% | 100%
SDAccel/tools/awssak0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
int xcldev::xclXbsak()
in SDAccel/userspace/src/awssak.cpp
395 105 2
int AwsXcl::pcieBarWrite()
in SDAccel/userspace/src/shim.cpp
321 40 4
int scan()
in SDAccel/userspace/src/scan.h
162 38 1
ssize_t xdma_xfer_submit()
in sdk/linux_kernel_drivers/xdma/libxdma.c
161 30 7
static void engine_status_dump()
in sdk/linux_kernel_drivers/xdma/libxdma.c
74 28 1
static void read_packet()
in sdk/userspace/fpga_mgmt_tools/src/virtual_jtag_server.c
104 27 1
void xpdev_destroy_interfaces()
in sdk/linux_kernel_drivers/xdma/xdma_cdev.c
69 22 1
int xpdev_create_interfaces()
in sdk/linux_kernel_drivers/xdma/xdma_cdev.c
108 22 1
size_t AwsXcl::xclPerfMonReadTrace()
in SDAccel/userspace/src/perf.cpp
98 20 2
ddArgs_t parse_dd_options()
in SDAccel/userspace/src/dd.cpp
66 18 2
static irqreturn_t xdma_isr()
in sdk/linux_kernel_drivers/xdma/libxdma.c
63 17 2
int xdma_performance_submit()
in sdk/linux_kernel_drivers/xdma/libxdma.c
92 16 2
static int create_xcdev()
in sdk/linux_kernel_drivers/xdma/xdma_cdev.c
85 16 5
static long xvc_ioctl()
in sdk/linux_kernel_drivers/xdma/cdev_xvc.c
101 16 3
static void _log()
in sdk/userspace/utils/log.c
105 15 7
int fpga_mgmt_load_local_image_sync_with_options()
in sdk/userspace/fpga_libs/fpga_mgmt/fpga_mgmt.c
74 15 4
def get_files()
in shared/lib/fileprovider.py
43 15 2
int AwsXcl::xclLoadXclBin()
in SDAccel/userspace/src/shim.cpp
62 15 1
int dump()
in SDAccel/userspace/src/awssak.h
129 15 1
int fpga_mgmt_clear_local_image_sync()
in sdk/userspace/fpga_libs/fpga_mgmt/fpga_mgmt.c
70 14 4