quipo / statsd

Golang StatsD client
MIT License
164 stars 51 forks source link

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

Closed algrebe closed 8 years ago

algrebe commented 8 years ago

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 8 years ago

done