tsaikd / gogstash

Logstash like, written in golang
MIT License
644 stars 106 forks source link

logevent: add compile path token cache #118

Closed tengattack closed 5 years ago

tengattack commented 5 years ago

This will make logevent.Get a slightly faster.

goos: windows
goarch: amd64
pkg: github.com/tsaikd/gogstash/config/logevent
BenchmarkCompilePath-12                  1000000          1523 ns/op        1360 B/op         19 allocs/op
BenchmarkCompilePathWithCache-12         2000000           692 ns/op          80 B/op          5 allocs/op
PASS