quipo/statsd

sending more than one stat (delimitted by \n) for bufferedclient over udp

Closed this issue · 1 comments

Currently, buffered client optimizes only at the level of each "key" being updated if many of them come before a flush happens.
However, SendEvent is called for each key, and then an fmt.Fprintf(c.conn...) for every stat in that event. This leads to quite a lot of udp traffic.
The statsd protocol supports sending more than one stat by separating by \n. By doing so, we will reduce the number of fmt.Fprintf(c.conn...) calls, thereby reducing udp traffic.

quipo commented

done