aws / amazon-kinesis-firehose-for-fluent-bit
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 33 units with 533 lines of code in units (83.5% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (53 lines of code)
    • 9 medium size units (272 lines of code)
    • 6 small units (105 lines of code)
    • 17 very small units (103 lines of code)
0% | 9% | 51% | 19% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 9% | 51% | 19% | 19%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
firehose0% | 22% | 68% | 6% | 2%
ROOT0% | 0% | 63% | 12% | 24%
plugins0% | 0% | 24% | 44% | 31%
firehose/mock_firehose0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func newPutRecordBatcher()
in firehose/firehose.go
53 10 5
func NewOutputPlugin()
in firehose/firehose.go
40 6 12
func()
in firehose/firehose.go
36 8 1
func FLBPluginFlushCtx()
in fluent-bit-firehose.go
36 7 4
func()
in firehose/firehose.go
35 11 1
func()
in firehose/firehose.go
31 7 1
func newFirehoseOutput()
in fluent-bit-firehose.go
30 3 2
func()
in firehose/firehose.go
22 5 1
func DecodeMap()
in plugins/plugins.go
21 7 1
func decodeSlice()
in plugins/plugins.go
21 7 1
func DataKeys()
in plugins/plugins.go
20 5 2
func NewTimeout()
in plugins/plugins.go
19 3 1
func SetupLogger()
in plugins/plugins.go
19 4 0
func LogKey()
in plugins/plugins.go
18 5 2
func replaceDots()
in firehose/firehose.go
16 4 2
func FLBPluginInit()
in fluent-bit-firehose.go
13 2 1
func EncodeLogKey()
in plugins/plugins.go
10 3 1
func GetBoolParam()
in plugins/plugins.go
10 3 2
func CustomUserAgentHandler()
in plugins/user_agent.go
10 1 0
func addPluginInstance()
in fluent-bit-firehose.go
10 2 1