microsoft / ApplicationInsights-Go
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 207 units with 1,985 lines of code in units (76.4% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (113 lines of code)
    • 17 medium size units (592 lines of code)
    • 28 small units (404 lines of code)
    • 160 very small units (876 lines of code)
0% | 5% | 29% | 20% | 44%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 5% | 29% | 20% | 44%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
appinsights0% | 10% | 29% | 27% | 32%
appinsights/contracts0% | 0% | 29% | 10% | 59%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func()
in appinsights/transmitter.go
58 14 1
func()
in appinsights/inmemorychannel.go
55 18 1
func()
in appinsights/contracts/remotedependencydata.go
50 14 1
func()
in appinsights/contracts/requestdata.go
46 13 1
func()
in appinsights/telemetrycontext.go
45 13 1
func()
in appinsights/contracts/availabilitydata.go
42 12 1
func()
in appinsights/inmemorychannel.go
40 12 1
func GetCallstack()
in appinsights/exception.go
39 8 1
func()
in appinsights/throttle.go
37 13 1
func()
in appinsights/inmemorychannel.go
36 10 1
func()
in appinsights/contracts/pageviewdata.go
34 10 1
func()
in appinsights/contracts/exceptiondata.go
33 10 1
func NewRequestTelemetry()
in appinsights/telemetry.go
31 4 4
func()
in appinsights/transmitter.go
31 12 1
func()
in appinsights/contracts/eventdata.go
30 9 1
func()
in appinsights/exception.go
27 5 1
func()
in appinsights/telemetry.go
26 6 1
func()
in appinsights/inmemorychannel.go
24 8 1
func()
in appinsights/contracts/messagedata.go
21 6 1
func()
in appinsights/contracts/envelope.go
20 5 1