Skip to content

Tags: mcuadros/go-syslog

Tags

v2.3.0

Toggle v2.3.0's commit message
travis: update versions

v2.2.1

Toggle v2.2.1's commit message
Fix bug in datagram message due to shared buffer (#34)

This bug was introduced by me in 8487663
and I'm sorry for that. The problem is that as the DatagramMessage
channel is buffered we cannot simply use the same buffer for reading all
incoming datagrams, because reading will change the []byte for all
messages still buffered in the channel.

I added some tests that fail on the previous version in the hope of
avoiding this same mistake in the future.

The solution was using a sync.Pool instance to acquire a buffer and
putting it back on the pool only when it was received and processed.
This solution has the same advantages of reusing the buffer without
the risk of changing a buffer still in use. And for some reason it
seems even faster than simply using the same buffer:

benchmark                           old ns/op     new ns/op     delta
BenchmarkDatagramNoFormatting-4     2693          2398          -10.95%

benchmark                           old MB/s     new MB/s     speedup
BenchmarkDatagramNoFormatting-4     17.45        19.59        1.12x

benchmark                           old allocs     new allocs     delta
BenchmarkDatagramNoFormatting-4     4              5              +25.00%

benchmark                           old bytes     new bytes     delta
BenchmarkDatagramNoFormatting-4     368           487           +32.34%

v2.2.0

Toggle v2.2.0's commit message
aliasing LogParts

v2.1.1

Toggle v2.1.1's commit message
Merge pull request #27 from abligh/fix-null-datagram-address

Fix null datagram address

v2.1.0

Toggle v2.1.0's commit message
Merge pull request #22 from abligh/automatic-format-detection

Automatic format detection

v1.3.0

Toggle v1.3.0's commit message
Merge pull request #12 from heroku/small_cleanup

Small cleanup