microsoft / SDN
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 67 units with 766 lines of code in units (2.4% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (94 lines of code)
    • 7 medium size units (214 lines of code)
    • 15 small units (198 lines of code)
    • 44 very small units (260 lines of code)
0% | 12% | 27% | 25% | 33%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 13% | 27% | 26% | 33%
c0% | 0% | 63% | 36% | 0%
py0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Kubernetes/wincni0% | 13% | 27% | 26% | 33%
NDKCI/RdmaSample0% | 0% | 63% | 36% | 0%
Kubernetes/linux0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func()
in Kubernetes/wincni/cni/network/network.go
94 16 1
func ParseArgs()
in Kubernetes/wincni/common/args.go
42 12 2
func()
in Kubernetes/wincni/cni/network/network.go
38 7 1
func()
in Kubernetes/wincni/cni/cni.go
35 8 1
func()
in Kubernetes/wincni/cni/cni.go
30 4 1
func main()
in Kubernetes/wincni/cni/network/plugin/main.go
27 5 0
func CallPlugin()
in Kubernetes/wincni/cni/cni.go
21 4 4
VOID DriverUnload()
in NDKCI/RdmaSample/RdmaSample.c
21 4 1
func GetNetworkInfo()
in Kubernetes/wincni/network/network.go
18 2 1
func()
in Kubernetes/wincni/cni/network/network.go
16 3 1
func NewPlugin()
in Kubernetes/wincni/cni/network/network.go
15 3 1
func()
in Kubernetes/wincni/network/manager.go
15 3 1
func()
in Kubernetes/wincni/network/network.go
15 2 1
func()
in Kubernetes/wincni/network/endpoint.go
14 1 1
func printHelpForArg()
in Kubernetes/wincni/common/args.go
13 3 1
func printHelp()
in Kubernetes/wincni/common/args.go
12 2 0
func GetEndpointInfo()
in Kubernetes/wincni/network/endpoint.go
12 1 1
func GetHNSNatPolicy()
in Kubernetes/wincni/network/endpoint.go
12 1 3
static NdkCreateFnCompletionCallback()
in NDKCI/RdmaSample/NdkWrapper.c
12 1 3
func LogNetworkInterfaces()
in Kubernetes/wincni/common/utils.go
11 3 0