bazelbuild / rules_webtesting
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 334 units with 4,698 lines of code in units (57.7% of code).
    • 2 very long units (308 lines of code)
    • 8 long units (507 lines of code)
    • 46 medium size units (1,430 lines of code)
    • 98 small units (1,406 lines of code)
    • 180 very small units (1,047 lines of code)
6% | 10% | 30% | 29% | 22%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go6% | 11% | 31% | 28% | 21%
py0% | 0% | 0% | 54% | 45%
java0% | 0% | 0% | 56% | 43%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
go/wtl9% | 14% | 21% | 29% | 25%
go/wsl20% | 7% | 40% | 25% | 7%
go/metadata0% | 14% | 44% | 33% | 6%
go/webdriver0% | 9% | 17% | 35% | 37%
go/bazel0% | 0% | 68% | 0% | 31%
go/httphelper0% | 0% | 60% | 16% | 22%
go/healthreporter0% | 0% | 100% | 0% | 0%
go/errors0% | 0% | 26% | 17% | 55%
go/portpicker0% | 0% | 83% | 0% | 16%
testing/web0% | 0% | 0% | 54% | 45%
java/com0% | 0% | 0% | 62% | 37%
go/webtest0% | 0% | 0% | 31% | 68%
go/cmdhelper0% | 0% | 0% | 52% | 47%
javatests/com0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func Run()
in go/wtl/wtl.go
158 35 6
func extractWSLCaps()
in go/wsl/driver/driver.go
150 39 2
func FromNewSessionArgs()
in go/metadata/capabilities/capabilities.go
83 24 1
func()
in go/wtl/proxy/driverhub/driver_hub.go
73 12 1
func CreateSession()
in go/webdriver/webdriver.go
69 16 4
func ProviderFunc()
in go/wtl/proxy/driverhub/scripttimeout/script_timeout.go
67 26 3
func Merge()
in go/metadata/metadata.go
55 11 2
func New()
in go/wsl/driver/driver.go
54 15 5
func()
in go/wtl/proxy/driverhub/driver_session.go
54 10 1
func()
in go/wtl/proxy/driverhub/debugger/debugger.go
52 10 1
func()
in go/wsl/driver/driver.go
49 11 1
func()
in go/wsl/upload/upload.go
48 10 1
func()
in go/wtl/proxy/driverhub/debugger/debugger.go
47 13 1
func createHandler()
in go/wsl/wsl.go
45 1 3
func New()
in go/wtl/proxy/proxy.go
44 6 5
func normalizeProxyCapability()
in go/metadata/capabilities/capabilities.go
44 13 2
func denormalizeJWP()
in go/metadata/capabilities/capabilities.go
43 10 1
func()
in go/metadata/capabilities/capabilities.go
43 14 1
func()
in go/wsl/hub/hub.go
42 11 1
func()
in go/wsl/resolver/resolver.go
41 11 1