aws / aws-fpga
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 603 units with 11,420 lines of code in units (0.2% of code).
    • 11 very long units (1,909 lines of code)
    • 24 long units (1,650 lines of code)
    • 137 medium size units (4,316 lines of code)
    • 123 small units (1,765 lines of code)
    • 308 very small units (1,780 lines of code)
16% | 14% | 37% | 15% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp29% | 16% | 26% | 11% | 16%
c9% | 17% | 44% | 16% | 12%
h37% | 9% | 33% | 11% | 8%
py7% | 3% | 33% | 21% | 33%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
SDAccel/userspace/src28% | 15% | 31% | 11% | 13%
sdk/linux_kernel_drivers/xdma8% | 18% | 51% | 14% | 7%
SDAccel/userspace/include88% | 0% | 0% | 7% | 3%
sdk/userspace/utils34% | 0% | 7% | 39% | 18%
sdk/userspace/fpga_mgmt_tools31% | 0% | 53% | 0% | 15%
shared/lib46% | 0% | 40% | 5% | 7%
sdk/userspace/fpga_libs0% | 37% | 22% | 31% | 9%
sdk/apps/virtual-ethernet0% | 17% | 42% | 16% | 24%
shared/lib/aws_fpga_test_utils0% | 0% | 17% | 30% | 51%
sdk/userspace/python_bindings0% | 0% | 100% | 0% | 0%
shared/lib/aws_fpga_utils0% | 0% | 85% | 0% | 14%
hdk/common/software0% | 0% | 50% | 0% | 49%
hdk/common/shell_stable0% | 0% | 18% | 17% | 64%
hdk/common/shell_v042618180% | 0% | 18% | 17% | 64%
ROOT0% | 0% | 65% | 34% | 0%
sdk/apps/byte_swapper0% | 0% | 0% | 44% | 55%
sdk/userspace/include0% | 0% | 0% | 0% | 100%
SDAccel/tools/awssak0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest 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
static std::string decodeAXICheckerCodes()
in SDAccel/userspace/include/xcl_axi_checker_codes.h
221 4 1
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
int dump()
in SDAccel/userspace/src/awssak.h
129 15 1
int xpdev_create_interfaces()
in sdk/linux_kernel_drivers/xdma/xdma_cdev.c
108 22 1
static void _log()
in sdk/userspace/utils/log.c
105 15 7
static void read_packet()
in sdk/userspace/fpga_mgmt_tools/src/virtual_jtag_server.c
104 27 1
def check_headers()
in shared/lib/check_src_headers.py
102 5 1
static long xvc_ioctl()
in sdk/linux_kernel_drivers/xdma/cdev_xvc.c
101 16 3
size_t AwsXcl::xclPerfMonReadTrace()
in SDAccel/userspace/src/perf.cpp
98 20 2
int xdma_performance_submit()
in sdk/linux_kernel_drivers/xdma/libxdma.c
92 16 2
int fpga_pci_get_dma_device_num()
in sdk/userspace/fpga_libs/fpga_dma/fpga_dma_utils.c
89 8 3
static int create_xcdev()
in sdk/linux_kernel_drivers/xdma/xdma_cdev.c
85 16 5
int xdma_cyclic_transfer_setup()
in sdk/linux_kernel_drivers/xdma/libxdma.c
82 13 1
int xcldev::device::readLAPCheckers()
in SDAccel/userspace/src/awssak_debug.cpp
76 12 1
int fpga_mgmt_load_local_image_sync_with_options()
in sdk/userspace/fpga_libs/fpga_mgmt/fpga_mgmt.c
74 15 4
static void engine_status_dump()
in sdk/linux_kernel_drivers/xdma/libxdma.c
74 28 1
int fpga_mgmt_clear_local_image_sync()
in sdk/userspace/fpga_libs/fpga_mgmt/fpga_mgmt.c
70 14 4