aws / aws-ofi-nccl
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 42 units with 1,490 lines of code in units (82.2% of code).
    • 2 very long units (233 lines of code)
    • 8 long units (540 lines of code)
    • 17 medium size units (546 lines of code)
    • 8 small units (126 lines of code)
    • 7 very small units (45 lines of code)
15% | 36% | 36% | 8% | 3%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c16% | 37% | 36% | 7% | 2%
h0% | 0% | 53% | 33% | 13%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src16% | 37% | 36% | 7% | 2%
include0% | 0% | 53% | 33% | 13%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
117 18 3
116 19 2
95 17 2
76 14 5
70 8 3
65 12 2
static ncclResult_t ofi_init()
in src/nccl_ofi_net.c
63 12 1
static ncclResult_t ofi_isend()
in src/nccl_ofi_net.c
63 10 5
static ncclResult_t ofi_irecv()
in src/nccl_ofi_net.c
55 9 5
static int get_ofi_provider()
in src/nccl_ofi_net.c
53 13 2
49 7 1
42 8 5
42 5 2
41 9 3
37 5 2
36 6 0
static int find_ofi_provider()
in src/nccl_ofi_net.c
35 9 1
static ncclResult_t ofi_test()
in src/nccl_ofi_net.c
33 8 3
31 5 1
static ncclResult_t ofi_flush()
in src/nccl_ofi_net.c
30 9 4