facebookresearch / torch_ucc
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 58 units with 1,126 lines of code in units (57.3% of code).
    • 0 very long units (0 lines of code)
    • 5 long units (349 lines of code)
    • 16 medium size units (497 lines of code)
    • 9 small units (145 lines of code)
    • 28 very small units (135 lines of code)
0% | 30% | 44% | 12% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp0% | 31% | 44% | 12% | 11%
hpp0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 31% | 44% | 12% | 11%
include0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
100 10 3
73 6 5
67 5 3
56 7 8
53 8 4
49 8 1
void CommPG::progress_loop()
in src/torch_ucc.cpp
44 8 0
40 8 1
36 3 2
35 8 2
void read_confg()
in src/torch_ucc.cpp
32 3 0
32 3 2
30 2 5
29 2 5
ucc_status_t oob_allgather_free()
in src/torch_ucc_comm.cpp
25 5 1
void CommPG::ucx_connect_eps()
in src/torch_ucc.cpp
25 2 2
25 2 5
ucc_status_t oob_allgather_test()
in src/torch_ucc_comm.cpp
24 5 1
void CommPG::ucc_create_team()
in src/torch_ucc.cpp
24 2 2
24 4 3